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/mongocluster/init.go
sdk/go/azure/mongocluster/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 mongocluster 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:mongocluster/firewallRule:FirewallRule": r = &FirewallRule{} case "azure:mongocluster/mongoCluster:MongoCluster": r = &MongoCluster{} case "azure:mongocluster/user:User": r = &User{} 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", "mongocluster/firewallRule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "mongocluster/mongoCluster", &module{version}, ) pulumi.RegisterResourceModule( "azure", "mongocluster/user", &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/mongocluster/pulumiTypes.go
sdk/go/azure/mongocluster/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 mongocluster 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 MongoClusterConnectionString struct { // The description of the connection string. Description *string `pulumi:"description"` // The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The value of the Mongo Cluster connection string. The `<user>:<password>` placeholder returned from API will be replaced by the real `administratorUsername` and `administratorPassword` if available in the state. Value *string `pulumi:"value"` } // MongoClusterConnectionStringInput is an input type that accepts MongoClusterConnectionStringArgs and MongoClusterConnectionStringOutput values. // You can construct a concrete instance of `MongoClusterConnectionStringInput` via: // // MongoClusterConnectionStringArgs{...} type MongoClusterConnectionStringInput interface { pulumi.Input ToMongoClusterConnectionStringOutput() MongoClusterConnectionStringOutput ToMongoClusterConnectionStringOutputWithContext(context.Context) MongoClusterConnectionStringOutput } type MongoClusterConnectionStringArgs struct { // The description of the connection string. Description pulumi.StringPtrInput `pulumi:"description"` // The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created. Name pulumi.StringPtrInput `pulumi:"name"` // The value of the Mongo Cluster connection string. The `<user>:<password>` placeholder returned from API will be replaced by the real `administratorUsername` and `administratorPassword` if available in the state. Value pulumi.StringPtrInput `pulumi:"value"` } func (MongoClusterConnectionStringArgs) ElementType() reflect.Type { return reflect.TypeOf((*MongoClusterConnectionString)(nil)).Elem() } func (i MongoClusterConnectionStringArgs) ToMongoClusterConnectionStringOutput() MongoClusterConnectionStringOutput { return i.ToMongoClusterConnectionStringOutputWithContext(context.Background()) } func (i MongoClusterConnectionStringArgs) ToMongoClusterConnectionStringOutputWithContext(ctx context.Context) MongoClusterConnectionStringOutput { return pulumi.ToOutputWithContext(ctx, i).(MongoClusterConnectionStringOutput) } // MongoClusterConnectionStringArrayInput is an input type that accepts MongoClusterConnectionStringArray and MongoClusterConnectionStringArrayOutput values. // You can construct a concrete instance of `MongoClusterConnectionStringArrayInput` via: // // MongoClusterConnectionStringArray{ MongoClusterConnectionStringArgs{...} } type MongoClusterConnectionStringArrayInput interface { pulumi.Input ToMongoClusterConnectionStringArrayOutput() MongoClusterConnectionStringArrayOutput ToMongoClusterConnectionStringArrayOutputWithContext(context.Context) MongoClusterConnectionStringArrayOutput } type MongoClusterConnectionStringArray []MongoClusterConnectionStringInput func (MongoClusterConnectionStringArray) ElementType() reflect.Type { return reflect.TypeOf((*[]MongoClusterConnectionString)(nil)).Elem() } func (i MongoClusterConnectionStringArray) ToMongoClusterConnectionStringArrayOutput() MongoClusterConnectionStringArrayOutput { return i.ToMongoClusterConnectionStringArrayOutputWithContext(context.Background()) } func (i MongoClusterConnectionStringArray) ToMongoClusterConnectionStringArrayOutputWithContext(ctx context.Context) MongoClusterConnectionStringArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(MongoClusterConnectionStringArrayOutput) } type MongoClusterConnectionStringOutput struct{ *pulumi.OutputState } func (MongoClusterConnectionStringOutput) ElementType() reflect.Type { return reflect.TypeOf((*MongoClusterConnectionString)(nil)).Elem() } func (o MongoClusterConnectionStringOutput) ToMongoClusterConnectionStringOutput() MongoClusterConnectionStringOutput { return o } func (o MongoClusterConnectionStringOutput) ToMongoClusterConnectionStringOutputWithContext(ctx context.Context) MongoClusterConnectionStringOutput { return o } // The description of the connection string. func (o MongoClusterConnectionStringOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v MongoClusterConnectionString) *string { return v.Description }).(pulumi.StringPtrOutput) } // The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created. func (o MongoClusterConnectionStringOutput) Name() pulumi.StringPtrOutput { return o.ApplyT(func(v MongoClusterConnectionString) *string { return v.Name }).(pulumi.StringPtrOutput) } // The value of the Mongo Cluster connection string. The `<user>:<password>` placeholder returned from API will be replaced by the real `administratorUsername` and `administratorPassword` if available in the state. func (o MongoClusterConnectionStringOutput) Value() pulumi.StringPtrOutput { return o.ApplyT(func(v MongoClusterConnectionString) *string { return v.Value }).(pulumi.StringPtrOutput) } type MongoClusterConnectionStringArrayOutput struct{ *pulumi.OutputState } func (MongoClusterConnectionStringArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]MongoClusterConnectionString)(nil)).Elem() } func (o MongoClusterConnectionStringArrayOutput) ToMongoClusterConnectionStringArrayOutput() MongoClusterConnectionStringArrayOutput { return o } func (o MongoClusterConnectionStringArrayOutput) ToMongoClusterConnectionStringArrayOutputWithContext(ctx context.Context) MongoClusterConnectionStringArrayOutput { return o } func (o MongoClusterConnectionStringArrayOutput) Index(i pulumi.IntInput) MongoClusterConnectionStringOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) MongoClusterConnectionString { return vs[0].([]MongoClusterConnectionString)[vs[1].(int)] }).(MongoClusterConnectionStringOutput) } type MongoClusterCustomerManagedKey struct { // The ID of the key vault key used for encryption. For example: `https://example-vault-name.vault.azure.net/keys/example-key-name`. KeyVaultKeyId string `pulumi:"keyVaultKeyId"` // The ID of the User Assigned Identity that has access to the Key Vault Key. UserAssignedIdentityId string `pulumi:"userAssignedIdentityId"` } // MongoClusterCustomerManagedKeyInput is an input type that accepts MongoClusterCustomerManagedKeyArgs and MongoClusterCustomerManagedKeyOutput values. // You can construct a concrete instance of `MongoClusterCustomerManagedKeyInput` via: // // MongoClusterCustomerManagedKeyArgs{...} type MongoClusterCustomerManagedKeyInput interface { pulumi.Input ToMongoClusterCustomerManagedKeyOutput() MongoClusterCustomerManagedKeyOutput ToMongoClusterCustomerManagedKeyOutputWithContext(context.Context) MongoClusterCustomerManagedKeyOutput } type MongoClusterCustomerManagedKeyArgs struct { // The ID of the key vault key used for encryption. For example: `https://example-vault-name.vault.azure.net/keys/example-key-name`. KeyVaultKeyId pulumi.StringInput `pulumi:"keyVaultKeyId"` // The ID of the User Assigned Identity that has access to the Key Vault Key. UserAssignedIdentityId pulumi.StringInput `pulumi:"userAssignedIdentityId"` } func (MongoClusterCustomerManagedKeyArgs) ElementType() reflect.Type { return reflect.TypeOf((*MongoClusterCustomerManagedKey)(nil)).Elem() } func (i MongoClusterCustomerManagedKeyArgs) ToMongoClusterCustomerManagedKeyOutput() MongoClusterCustomerManagedKeyOutput { return i.ToMongoClusterCustomerManagedKeyOutputWithContext(context.Background()) } func (i MongoClusterCustomerManagedKeyArgs) ToMongoClusterCustomerManagedKeyOutputWithContext(ctx context.Context) MongoClusterCustomerManagedKeyOutput { return pulumi.ToOutputWithContext(ctx, i).(MongoClusterCustomerManagedKeyOutput) } func (i MongoClusterCustomerManagedKeyArgs) ToMongoClusterCustomerManagedKeyPtrOutput() MongoClusterCustomerManagedKeyPtrOutput { return i.ToMongoClusterCustomerManagedKeyPtrOutputWithContext(context.Background()) } func (i MongoClusterCustomerManagedKeyArgs) ToMongoClusterCustomerManagedKeyPtrOutputWithContext(ctx context.Context) MongoClusterCustomerManagedKeyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(MongoClusterCustomerManagedKeyOutput).ToMongoClusterCustomerManagedKeyPtrOutputWithContext(ctx) } // MongoClusterCustomerManagedKeyPtrInput is an input type that accepts MongoClusterCustomerManagedKeyArgs, MongoClusterCustomerManagedKeyPtr and MongoClusterCustomerManagedKeyPtrOutput values. // You can construct a concrete instance of `MongoClusterCustomerManagedKeyPtrInput` via: // // MongoClusterCustomerManagedKeyArgs{...} // // or: // // nil type MongoClusterCustomerManagedKeyPtrInput interface { pulumi.Input ToMongoClusterCustomerManagedKeyPtrOutput() MongoClusterCustomerManagedKeyPtrOutput ToMongoClusterCustomerManagedKeyPtrOutputWithContext(context.Context) MongoClusterCustomerManagedKeyPtrOutput } type mongoClusterCustomerManagedKeyPtrType MongoClusterCustomerManagedKeyArgs func MongoClusterCustomerManagedKeyPtr(v *MongoClusterCustomerManagedKeyArgs) MongoClusterCustomerManagedKeyPtrInput { return (*mongoClusterCustomerManagedKeyPtrType)(v) } func (*mongoClusterCustomerManagedKeyPtrType) ElementType() reflect.Type { return reflect.TypeOf((**MongoClusterCustomerManagedKey)(nil)).Elem() } func (i *mongoClusterCustomerManagedKeyPtrType) ToMongoClusterCustomerManagedKeyPtrOutput() MongoClusterCustomerManagedKeyPtrOutput { return i.ToMongoClusterCustomerManagedKeyPtrOutputWithContext(context.Background()) } func (i *mongoClusterCustomerManagedKeyPtrType) ToMongoClusterCustomerManagedKeyPtrOutputWithContext(ctx context.Context) MongoClusterCustomerManagedKeyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(MongoClusterCustomerManagedKeyPtrOutput) } type MongoClusterCustomerManagedKeyOutput struct{ *pulumi.OutputState } func (MongoClusterCustomerManagedKeyOutput) ElementType() reflect.Type { return reflect.TypeOf((*MongoClusterCustomerManagedKey)(nil)).Elem() } func (o MongoClusterCustomerManagedKeyOutput) ToMongoClusterCustomerManagedKeyOutput() MongoClusterCustomerManagedKeyOutput { return o } func (o MongoClusterCustomerManagedKeyOutput) ToMongoClusterCustomerManagedKeyOutputWithContext(ctx context.Context) MongoClusterCustomerManagedKeyOutput { return o } func (o MongoClusterCustomerManagedKeyOutput) ToMongoClusterCustomerManagedKeyPtrOutput() MongoClusterCustomerManagedKeyPtrOutput { return o.ToMongoClusterCustomerManagedKeyPtrOutputWithContext(context.Background()) } func (o MongoClusterCustomerManagedKeyOutput) ToMongoClusterCustomerManagedKeyPtrOutputWithContext(ctx context.Context) MongoClusterCustomerManagedKeyPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v MongoClusterCustomerManagedKey) *MongoClusterCustomerManagedKey { return &v }).(MongoClusterCustomerManagedKeyPtrOutput) } // The ID of the key vault key used for encryption. For example: `https://example-vault-name.vault.azure.net/keys/example-key-name`. func (o MongoClusterCustomerManagedKeyOutput) KeyVaultKeyId() pulumi.StringOutput { return o.ApplyT(func(v MongoClusterCustomerManagedKey) string { return v.KeyVaultKeyId }).(pulumi.StringOutput) } // The ID of the User Assigned Identity that has access to the Key Vault Key. func (o MongoClusterCustomerManagedKeyOutput) UserAssignedIdentityId() pulumi.StringOutput { return o.ApplyT(func(v MongoClusterCustomerManagedKey) string { return v.UserAssignedIdentityId }).(pulumi.StringOutput) } type MongoClusterCustomerManagedKeyPtrOutput struct{ *pulumi.OutputState } func (MongoClusterCustomerManagedKeyPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**MongoClusterCustomerManagedKey)(nil)).Elem() } func (o MongoClusterCustomerManagedKeyPtrOutput) ToMongoClusterCustomerManagedKeyPtrOutput() MongoClusterCustomerManagedKeyPtrOutput { return o } func (o MongoClusterCustomerManagedKeyPtrOutput) ToMongoClusterCustomerManagedKeyPtrOutputWithContext(ctx context.Context) MongoClusterCustomerManagedKeyPtrOutput { return o } func (o MongoClusterCustomerManagedKeyPtrOutput) Elem() MongoClusterCustomerManagedKeyOutput { return o.ApplyT(func(v *MongoClusterCustomerManagedKey) MongoClusterCustomerManagedKey { if v != nil { return *v } var ret MongoClusterCustomerManagedKey return ret }).(MongoClusterCustomerManagedKeyOutput) } // The ID of the key vault key used for encryption. For example: `https://example-vault-name.vault.azure.net/keys/example-key-name`. func (o MongoClusterCustomerManagedKeyPtrOutput) KeyVaultKeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v *MongoClusterCustomerManagedKey) *string { if v == nil { return nil } return &v.KeyVaultKeyId }).(pulumi.StringPtrOutput) } // The ID of the User Assigned Identity that has access to the Key Vault Key. func (o MongoClusterCustomerManagedKeyPtrOutput) UserAssignedIdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v *MongoClusterCustomerManagedKey) *string { if v == nil { return nil } return &v.UserAssignedIdentityId }).(pulumi.StringPtrOutput) } type MongoClusterIdentity struct { // A list of one or more Resource IDs for User Assigned Managed identities to assign. // // > **Note:** Required when `type` is set to `UserAssigned`. IdentityIds []string `pulumi:"identityIds"` // The type of managed identity to assign. Possible value is `UserAssigned`. Type string `pulumi:"type"` } // MongoClusterIdentityInput is an input type that accepts MongoClusterIdentityArgs and MongoClusterIdentityOutput values. // You can construct a concrete instance of `MongoClusterIdentityInput` via: // // MongoClusterIdentityArgs{...} type MongoClusterIdentityInput interface { pulumi.Input ToMongoClusterIdentityOutput() MongoClusterIdentityOutput ToMongoClusterIdentityOutputWithContext(context.Context) MongoClusterIdentityOutput } type MongoClusterIdentityArgs struct { // A list of one or more Resource IDs for User Assigned Managed identities to assign. // // > **Note:** Required when `type` is set to `UserAssigned`. IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"` // The type of managed identity to assign. Possible value is `UserAssigned`. Type pulumi.StringInput `pulumi:"type"` } func (MongoClusterIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*MongoClusterIdentity)(nil)).Elem() } func (i MongoClusterIdentityArgs) ToMongoClusterIdentityOutput() MongoClusterIdentityOutput { return i.ToMongoClusterIdentityOutputWithContext(context.Background()) } func (i MongoClusterIdentityArgs) ToMongoClusterIdentityOutputWithContext(ctx context.Context) MongoClusterIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(MongoClusterIdentityOutput) } func (i MongoClusterIdentityArgs) ToMongoClusterIdentityPtrOutput() MongoClusterIdentityPtrOutput { return i.ToMongoClusterIdentityPtrOutputWithContext(context.Background()) } func (i MongoClusterIdentityArgs) ToMongoClusterIdentityPtrOutputWithContext(ctx context.Context) MongoClusterIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(MongoClusterIdentityOutput).ToMongoClusterIdentityPtrOutputWithContext(ctx) } // MongoClusterIdentityPtrInput is an input type that accepts MongoClusterIdentityArgs, MongoClusterIdentityPtr and MongoClusterIdentityPtrOutput values. // You can construct a concrete instance of `MongoClusterIdentityPtrInput` via: // // MongoClusterIdentityArgs{...} // // or: // // nil type MongoClusterIdentityPtrInput interface { pulumi.Input ToMongoClusterIdentityPtrOutput() MongoClusterIdentityPtrOutput ToMongoClusterIdentityPtrOutputWithContext(context.Context) MongoClusterIdentityPtrOutput } type mongoClusterIdentityPtrType MongoClusterIdentityArgs func MongoClusterIdentityPtr(v *MongoClusterIdentityArgs) MongoClusterIdentityPtrInput { return (*mongoClusterIdentityPtrType)(v) } func (*mongoClusterIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**MongoClusterIdentity)(nil)).Elem() } func (i *mongoClusterIdentityPtrType) ToMongoClusterIdentityPtrOutput() MongoClusterIdentityPtrOutput { return i.ToMongoClusterIdentityPtrOutputWithContext(context.Background()) } func (i *mongoClusterIdentityPtrType) ToMongoClusterIdentityPtrOutputWithContext(ctx context.Context) MongoClusterIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(MongoClusterIdentityPtrOutput) } type MongoClusterIdentityOutput struct{ *pulumi.OutputState } func (MongoClusterIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*MongoClusterIdentity)(nil)).Elem() } func (o MongoClusterIdentityOutput) ToMongoClusterIdentityOutput() MongoClusterIdentityOutput { return o } func (o MongoClusterIdentityOutput) ToMongoClusterIdentityOutputWithContext(ctx context.Context) MongoClusterIdentityOutput { return o } func (o MongoClusterIdentityOutput) ToMongoClusterIdentityPtrOutput() MongoClusterIdentityPtrOutput { return o.ToMongoClusterIdentityPtrOutputWithContext(context.Background()) } func (o MongoClusterIdentityOutput) ToMongoClusterIdentityPtrOutputWithContext(ctx context.Context) MongoClusterIdentityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v MongoClusterIdentity) *MongoClusterIdentity { return &v }).(MongoClusterIdentityPtrOutput) } // A list of one or more Resource IDs for User Assigned Managed identities to assign. // // > **Note:** Required when `type` is set to `UserAssigned`. func (o MongoClusterIdentityOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v MongoClusterIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput) } // The type of managed identity to assign. Possible value is `UserAssigned`. func (o MongoClusterIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v MongoClusterIdentity) string { return v.Type }).(pulumi.StringOutput) } type MongoClusterIdentityPtrOutput struct{ *pulumi.OutputState } func (MongoClusterIdentityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**MongoClusterIdentity)(nil)).Elem() } func (o MongoClusterIdentityPtrOutput) ToMongoClusterIdentityPtrOutput() MongoClusterIdentityPtrOutput { return o } func (o MongoClusterIdentityPtrOutput) ToMongoClusterIdentityPtrOutputWithContext(ctx context.Context) MongoClusterIdentityPtrOutput { return o } func (o MongoClusterIdentityPtrOutput) Elem() MongoClusterIdentityOutput { return o.ApplyT(func(v *MongoClusterIdentity) MongoClusterIdentity { if v != nil { return *v } var ret MongoClusterIdentity return ret }).(MongoClusterIdentityOutput) } // A list of one or more Resource IDs for User Assigned Managed identities to assign. // // > **Note:** Required when `type` is set to `UserAssigned`. func (o MongoClusterIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *MongoClusterIdentity) []string { if v == nil { return nil } return v.IdentityIds }).(pulumi.StringArrayOutput) } // The type of managed identity to assign. Possible value is `UserAssigned`. func (o MongoClusterIdentityPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *MongoClusterIdentity) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } type MongoClusterRestore struct { // The point in time (in UTC) to restore from, in ISO 8601 format (e.g., `2024-01-01T00:00:00Z`). Changing this forces a new resource to be created. PointInTimeUtc string `pulumi:"pointInTimeUtc"` // The ID of the source MongoDB Cluster to restore from. Changing this forces a new resource to be created. SourceId string `pulumi:"sourceId"` } // MongoClusterRestoreInput is an input type that accepts MongoClusterRestoreArgs and MongoClusterRestoreOutput values. // You can construct a concrete instance of `MongoClusterRestoreInput` via: // // MongoClusterRestoreArgs{...} type MongoClusterRestoreInput interface { pulumi.Input ToMongoClusterRestoreOutput() MongoClusterRestoreOutput ToMongoClusterRestoreOutputWithContext(context.Context) MongoClusterRestoreOutput } type MongoClusterRestoreArgs struct { // The point in time (in UTC) to restore from, in ISO 8601 format (e.g., `2024-01-01T00:00:00Z`). Changing this forces a new resource to be created. PointInTimeUtc pulumi.StringInput `pulumi:"pointInTimeUtc"` // The ID of the source MongoDB Cluster to restore from. Changing this forces a new resource to be created. SourceId pulumi.StringInput `pulumi:"sourceId"` } func (MongoClusterRestoreArgs) ElementType() reflect.Type { return reflect.TypeOf((*MongoClusterRestore)(nil)).Elem() } func (i MongoClusterRestoreArgs) ToMongoClusterRestoreOutput() MongoClusterRestoreOutput { return i.ToMongoClusterRestoreOutputWithContext(context.Background()) } func (i MongoClusterRestoreArgs) ToMongoClusterRestoreOutputWithContext(ctx context.Context) MongoClusterRestoreOutput { return pulumi.ToOutputWithContext(ctx, i).(MongoClusterRestoreOutput) } func (i MongoClusterRestoreArgs) ToMongoClusterRestorePtrOutput() MongoClusterRestorePtrOutput { return i.ToMongoClusterRestorePtrOutputWithContext(context.Background()) } func (i MongoClusterRestoreArgs) ToMongoClusterRestorePtrOutputWithContext(ctx context.Context) MongoClusterRestorePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(MongoClusterRestoreOutput).ToMongoClusterRestorePtrOutputWithContext(ctx) } // MongoClusterRestorePtrInput is an input type that accepts MongoClusterRestoreArgs, MongoClusterRestorePtr and MongoClusterRestorePtrOutput values. // You can construct a concrete instance of `MongoClusterRestorePtrInput` via: // // MongoClusterRestoreArgs{...} // // or: // // nil type MongoClusterRestorePtrInput interface { pulumi.Input ToMongoClusterRestorePtrOutput() MongoClusterRestorePtrOutput ToMongoClusterRestorePtrOutputWithContext(context.Context) MongoClusterRestorePtrOutput } type mongoClusterRestorePtrType MongoClusterRestoreArgs func MongoClusterRestorePtr(v *MongoClusterRestoreArgs) MongoClusterRestorePtrInput { return (*mongoClusterRestorePtrType)(v) } func (*mongoClusterRestorePtrType) ElementType() reflect.Type { return reflect.TypeOf((**MongoClusterRestore)(nil)).Elem() } func (i *mongoClusterRestorePtrType) ToMongoClusterRestorePtrOutput() MongoClusterRestorePtrOutput { return i.ToMongoClusterRestorePtrOutputWithContext(context.Background()) } func (i *mongoClusterRestorePtrType) ToMongoClusterRestorePtrOutputWithContext(ctx context.Context) MongoClusterRestorePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(MongoClusterRestorePtrOutput) } type MongoClusterRestoreOutput struct{ *pulumi.OutputState } func (MongoClusterRestoreOutput) ElementType() reflect.Type { return reflect.TypeOf((*MongoClusterRestore)(nil)).Elem() } func (o MongoClusterRestoreOutput) ToMongoClusterRestoreOutput() MongoClusterRestoreOutput { return o } func (o MongoClusterRestoreOutput) ToMongoClusterRestoreOutputWithContext(ctx context.Context) MongoClusterRestoreOutput { return o } func (o MongoClusterRestoreOutput) ToMongoClusterRestorePtrOutput() MongoClusterRestorePtrOutput { return o.ToMongoClusterRestorePtrOutputWithContext(context.Background()) } func (o MongoClusterRestoreOutput) ToMongoClusterRestorePtrOutputWithContext(ctx context.Context) MongoClusterRestorePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v MongoClusterRestore) *MongoClusterRestore { return &v }).(MongoClusterRestorePtrOutput) } // The point in time (in UTC) to restore from, in ISO 8601 format (e.g., `2024-01-01T00:00:00Z`). Changing this forces a new resource to be created. func (o MongoClusterRestoreOutput) PointInTimeUtc() pulumi.StringOutput { return o.ApplyT(func(v MongoClusterRestore) string { return v.PointInTimeUtc }).(pulumi.StringOutput) } // The ID of the source MongoDB Cluster to restore from. Changing this forces a new resource to be created. func (o MongoClusterRestoreOutput) SourceId() pulumi.StringOutput { return o.ApplyT(func(v MongoClusterRestore) string { return v.SourceId }).(pulumi.StringOutput) } type MongoClusterRestorePtrOutput struct{ *pulumi.OutputState } func (MongoClusterRestorePtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**MongoClusterRestore)(nil)).Elem() } func (o MongoClusterRestorePtrOutput) ToMongoClusterRestorePtrOutput() MongoClusterRestorePtrOutput { return o } func (o MongoClusterRestorePtrOutput) ToMongoClusterRestorePtrOutputWithContext(ctx context.Context) MongoClusterRestorePtrOutput { return o } func (o MongoClusterRestorePtrOutput) Elem() MongoClusterRestoreOutput { return o.ApplyT(func(v *MongoClusterRestore) MongoClusterRestore { if v != nil { return *v } var ret MongoClusterRestore return ret }).(MongoClusterRestoreOutput) } // The point in time (in UTC) to restore from, in ISO 8601 format (e.g., `2024-01-01T00:00:00Z`). Changing this forces a new resource to be created. func (o MongoClusterRestorePtrOutput) PointInTimeUtc() pulumi.StringPtrOutput { return o.ApplyT(func(v *MongoClusterRestore) *string { if v == nil { return nil } return &v.PointInTimeUtc }).(pulumi.StringPtrOutput) } // The ID of the source MongoDB Cluster to restore from. Changing this forces a new resource to be created. func (o MongoClusterRestorePtrOutput) SourceId() pulumi.StringPtrOutput { return o.ApplyT(func(v *MongoClusterRestore) *string { if v == nil { return nil } return &v.SourceId }).(pulumi.StringPtrOutput) } type UserRole struct { // The name of the database to which the role will be applied. Changing this forces a new resource to be created. Database string `pulumi:"database"` // The role name. The only possible value is `root`. Changing this forces a new resource to be created. Name string `pulumi:"name"` } // UserRoleInput is an input type that accepts UserRoleArgs and UserRoleOutput values. // You can construct a concrete instance of `UserRoleInput` via: // // UserRoleArgs{...} type UserRoleInput interface { pulumi.Input ToUserRoleOutput() UserRoleOutput ToUserRoleOutputWithContext(context.Context) UserRoleOutput } type UserRoleArgs struct { // The name of the database to which the role will be applied. Changing this forces a new resource to be created. Database pulumi.StringInput `pulumi:"database"` // The role name. The only possible value is `root`. Changing this forces a new resource to be created. Name pulumi.StringInput `pulumi:"name"` } func (UserRoleArgs) ElementType() reflect.Type { return reflect.TypeOf((*UserRole)(nil)).Elem() } func (i UserRoleArgs) ToUserRoleOutput() UserRoleOutput { return i.ToUserRoleOutputWithContext(context.Background()) } func (i UserRoleArgs) ToUserRoleOutputWithContext(ctx context.Context) UserRoleOutput { return pulumi.ToOutputWithContext(ctx, i).(UserRoleOutput) } // UserRoleArrayInput is an input type that accepts UserRoleArray and UserRoleArrayOutput values. // You can construct a concrete instance of `UserRoleArrayInput` via: // // UserRoleArray{ UserRoleArgs{...} } type UserRoleArrayInput interface { pulumi.Input ToUserRoleArrayOutput() UserRoleArrayOutput ToUserRoleArrayOutputWithContext(context.Context) UserRoleArrayOutput } type UserRoleArray []UserRoleInput func (UserRoleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]UserRole)(nil)).Elem() } func (i UserRoleArray) ToUserRoleArrayOutput() UserRoleArrayOutput { return i.ToUserRoleArrayOutputWithContext(context.Background()) } func (i UserRoleArray) ToUserRoleArrayOutputWithContext(ctx context.Context) UserRoleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(UserRoleArrayOutput) } type UserRoleOutput struct{ *pulumi.OutputState } func (UserRoleOutput) ElementType() reflect.Type { return reflect.TypeOf((*UserRole)(nil)).Elem() } func (o UserRoleOutput) ToUserRoleOutput() UserRoleOutput { return o } func (o UserRoleOutput) ToUserRoleOutputWithContext(ctx context.Context) UserRoleOutput { return o } // The name of the database to which the role will be applied. Changing this forces a new resource to be created. func (o UserRoleOutput) Database() pulumi.StringOutput { return o.ApplyT(func(v UserRole) string { return v.Database }).(pulumi.StringOutput) } // The role name. The only possible value is `root`. Changing this forces a new resource to be created. func (o UserRoleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v UserRole) string { return v.Name }).(pulumi.StringOutput) } type UserRoleArrayOutput struct{ *pulumi.OutputState } func (UserRoleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]UserRole)(nil)).Elem() } func (o UserRoleArrayOutput) ToUserRoleArrayOutput() UserRoleArrayOutput { return o } func (o UserRoleArrayOutput) ToUserRoleArrayOutputWithContext(ctx context.Context) UserRoleArrayOutput { return o } func (o UserRoleArrayOutput) Index(i pulumi.IntInput) UserRoleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) UserRole { return vs[0].([]UserRole)[vs[1].(int)] }).(UserRoleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*MongoClusterConnectionStringInput)(nil)).Elem(), MongoClusterConnectionStringArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*MongoClusterConnectionStringArrayInput)(nil)).Elem(), MongoClusterConnectionStringArray{}) pulumi.RegisterInputType(reflect.TypeOf((*MongoClusterCustomerManagedKeyInput)(nil)).Elem(), MongoClusterCustomerManagedKeyArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*MongoClusterCustomerManagedKeyPtrInput)(nil)).Elem(), MongoClusterCustomerManagedKeyArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*MongoClusterIdentityInput)(nil)).Elem(), MongoClusterIdentityArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*MongoClusterIdentityPtrInput)(nil)).Elem(), MongoClusterIdentityArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*MongoClusterRestoreInput)(nil)).Elem(), MongoClusterRestoreArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*MongoClusterRestorePtrInput)(nil)).Elem(), MongoClusterRestoreArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*UserRoleInput)(nil)).Elem(), UserRoleArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*UserRoleArrayInput)(nil)).Elem(), UserRoleArray{}) pulumi.RegisterOutputType(MongoClusterConnectionStringOutput{}) pulumi.RegisterOutputType(MongoClusterConnectionStringArrayOutput{}) pulumi.RegisterOutputType(MongoClusterCustomerManagedKeyOutput{}) pulumi.RegisterOutputType(MongoClusterCustomerManagedKeyPtrOutput{}) pulumi.RegisterOutputType(MongoClusterIdentityOutput{}) pulumi.RegisterOutputType(MongoClusterIdentityPtrOutput{}) pulumi.RegisterOutputType(MongoClusterRestoreOutput{}) pulumi.RegisterOutputType(MongoClusterRestorePtrOutput{}) pulumi.RegisterOutputType(UserRoleOutput{}) pulumi.RegisterOutputType(UserRoleArrayOutput{}) }
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/mongocluster/mongoCluster.go
sdk/go/azure/mongocluster/mongoCluster.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 mongocluster import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a MongoDB Cluster using vCore Architecture. // // ## 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/mongocluster" // "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("East US"), // }) // if err != nil { // return err // } // _, err = mongocluster.NewMongoCluster(ctx, "example", &mongocluster.MongoClusterArgs{ // Name: pulumi.String("example-mc"), // ResourceGroupName: example.Name, // Location: example.Location, // AdministratorUsername: pulumi.String("adminTerraform"), // AdministratorPassword: pulumi.String("QAZwsx123"), // ShardCount: pulumi.Int(1), // ComputeTier: pulumi.String("Free"), // HighAvailabilityMode: pulumi.String("Disabled"), // StorageSizeInGb: pulumi.Int(32), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Preview Feature GeoReplicas) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mongocluster" // "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("East US"), // }) // if err != nil { // return err // } // exampleMongoCluster, err := mongocluster.NewMongoCluster(ctx, "example", &mongocluster.MongoClusterArgs{ // Name: pulumi.String("example-mc"), // ResourceGroupName: example.Name, // Location: example.Location, // AdministratorUsername: pulumi.String("adminTerraform"), // AdministratorPassword: pulumi.String("QAZwsx123"), // ShardCount: pulumi.Int(1), // ComputeTier: pulumi.String("M30"), // HighAvailabilityMode: pulumi.String("ZoneRedundantPreferred"), // StorageSizeInGb: pulumi.Int(64), // PreviewFeatures: pulumi.StringArray{ // pulumi.String("GeoReplicas"), // }, // }) // if err != nil { // return err // } // _, err = mongocluster.NewMongoCluster(ctx, "example_geo_replica", &mongocluster.MongoClusterArgs{ // Name: pulumi.String("example-mc-geo"), // ResourceGroupName: example.Name, // Location: pulumi.String("Central US"), // SourceServerId: exampleMongoCluster.ID(), // SourceLocation: exampleMongoCluster.Location, // CreateMode: pulumi.String("GeoReplica"), // }) // 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.DocumentDB` - 2025-09-01 // // ## Import // // MongoDB Clusters can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:mongocluster/mongoCluster:MongoCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DocumentDB/mongoClusters/myMongoCluster // ``` type MongoCluster struct { pulumi.CustomResourceState // The Password associated with the `administratorUsername` for the MongoDB Cluster. AdministratorPassword pulumi.StringPtrOutput `pulumi:"administratorPassword"` // The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created. AdministratorUsername pulumi.StringPtrOutput `pulumi:"administratorUsername"` // A list of allowed authentication modes for the MongoDB Cluster. Possible values are `NativeAuth` and `MicrosoftEntraID`. AuthenticationMethods pulumi.StringArrayOutput `pulumi:"authenticationMethods"` // The compute tier to assign to the MongoDB Cluster. Possible values are `Free`, `M10`, `M20`, `M25`, `M30`, `M40`, `M50`, `M60`, `M80`, and `M200`. ComputeTier pulumi.StringPtrOutput `pulumi:"computeTier"` // One or more `connectionStrings` blocks as defined below. ConnectionStrings MongoClusterConnectionStringArrayOutput `pulumi:"connectionStrings"` // The creation mode for the MongoDB Cluster. Possible values are `Default`, `GeoReplica` and `PointInTimeRestore`. Defaults to `Default`. Changing this forces a new resource to be created. CreateMode pulumi.StringPtrOutput `pulumi:"createMode"` // A `customerManagedKey` block as defined below. Changing this forces a new resource to be created. CustomerManagedKey MongoClusterCustomerManagedKeyPtrOutput `pulumi:"customerManagedKey"` // Is the Data API for the MongoDB Cluster enabled? Defaults to `false`. // // > **Note:** `dataApiModeEnabled` can only be set when `createMode` is `Default`. Once enabled, it can only be disabled by recreating the resource. DataApiModeEnabled pulumi.BoolPtrOutput `pulumi:"dataApiModeEnabled"` // The high availability mode for the MongoDB Cluster. Possibles values are `Disabled` and `ZoneRedundantPreferred`. HighAvailabilityMode pulumi.StringPtrOutput `pulumi:"highAvailabilityMode"` // An `identity` block as detailed below. // // > **Note:** When adding or removing `identity`, a resource recreation will be triggered. Identity MongoClusterIdentityPtrOutput `pulumi:"identity"` // The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created. PreviewFeatures pulumi.StringArrayOutput `pulumi:"previewFeatures"` // The Public Network Access setting for the MongoDB Cluster. Possibles values are `Disabled` and `Enabled`. Defaults to `Enabled`. PublicNetworkAccess pulumi.StringPtrOutput `pulumi:"publicNetworkAccess"` // The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` Restore MongoClusterRestorePtrOutput `pulumi:"restore"` // The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created. ShardCount pulumi.IntPtrOutput `pulumi:"shardCount"` // The location of the source MongoDB Cluster. Changing this forces a new resource to be created. SourceLocation pulumi.StringPtrOutput `pulumi:"sourceLocation"` // The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created. SourceServerId pulumi.StringPtrOutput `pulumi:"sourceServerId"` // The size of the data disk space for the MongoDB Cluster. StorageSizeInGb pulumi.IntPtrOutput `pulumi:"storageSizeInGb"` // The storage type for the MongoDB Cluster. Possible values are `PremiumSSD` and `PremiumSSDv2`. Defaults to `PremiumSSD`. Changing this forces a new resource to be created. StorageType pulumi.StringPtrOutput `pulumi:"storageType"` // A mapping of tags to assign to the MongoDB Cluster. Tags pulumi.StringMapOutput `pulumi:"tags"` // The version for the MongoDB Cluster. Possibles values are `5.0`, `6.0`, `7.0` and `8.0`. Version pulumi.StringPtrOutput `pulumi:"version"` } // NewMongoCluster registers a new resource with the given unique name, arguments, and options. func NewMongoCluster(ctx *pulumi.Context, name string, args *MongoClusterArgs, opts ...pulumi.ResourceOption) (*MongoCluster, 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'") } aliases := pulumi.Aliases([]pulumi.Alias{ { Type: pulumi.String("azure:cosmosdb/mongoCluster:MongoCluster"), }, }) opts = append(opts, aliases) if args.AdministratorPassword != nil { args.AdministratorPassword = pulumi.ToSecret(args.AdministratorPassword).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "administratorPassword", "connectionStrings", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource MongoCluster err := ctx.RegisterResource("azure:mongocluster/mongoCluster:MongoCluster", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetMongoCluster gets an existing MongoCluster 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 GetMongoCluster(ctx *pulumi.Context, name string, id pulumi.IDInput, state *MongoClusterState, opts ...pulumi.ResourceOption) (*MongoCluster, error) { var resource MongoCluster err := ctx.ReadResource("azure:mongocluster/mongoCluster:MongoCluster", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering MongoCluster resources. type mongoClusterState struct { // The Password associated with the `administratorUsername` for the MongoDB Cluster. AdministratorPassword *string `pulumi:"administratorPassword"` // The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created. AdministratorUsername *string `pulumi:"administratorUsername"` // A list of allowed authentication modes for the MongoDB Cluster. Possible values are `NativeAuth` and `MicrosoftEntraID`. AuthenticationMethods []string `pulumi:"authenticationMethods"` // The compute tier to assign to the MongoDB Cluster. Possible values are `Free`, `M10`, `M20`, `M25`, `M30`, `M40`, `M50`, `M60`, `M80`, and `M200`. ComputeTier *string `pulumi:"computeTier"` // One or more `connectionStrings` blocks as defined below. ConnectionStrings []MongoClusterConnectionString `pulumi:"connectionStrings"` // The creation mode for the MongoDB Cluster. Possible values are `Default`, `GeoReplica` and `PointInTimeRestore`. Defaults to `Default`. Changing this forces a new resource to be created. CreateMode *string `pulumi:"createMode"` // A `customerManagedKey` block as defined below. Changing this forces a new resource to be created. CustomerManagedKey *MongoClusterCustomerManagedKey `pulumi:"customerManagedKey"` // Is the Data API for the MongoDB Cluster enabled? Defaults to `false`. // // > **Note:** `dataApiModeEnabled` can only be set when `createMode` is `Default`. Once enabled, it can only be disabled by recreating the resource. DataApiModeEnabled *bool `pulumi:"dataApiModeEnabled"` // The high availability mode for the MongoDB Cluster. Possibles values are `Disabled` and `ZoneRedundantPreferred`. HighAvailabilityMode *string `pulumi:"highAvailabilityMode"` // An `identity` block as detailed below. // // > **Note:** When adding or removing `identity`, a resource recreation will be triggered. Identity *MongoClusterIdentity `pulumi:"identity"` // The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created. PreviewFeatures []string `pulumi:"previewFeatures"` // The Public Network Access setting for the MongoDB Cluster. Possibles values are `Disabled` and `Enabled`. Defaults to `Enabled`. PublicNetworkAccess *string `pulumi:"publicNetworkAccess"` // The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` Restore *MongoClusterRestore `pulumi:"restore"` // The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created. ShardCount *int `pulumi:"shardCount"` // The location of the source MongoDB Cluster. Changing this forces a new resource to be created. SourceLocation *string `pulumi:"sourceLocation"` // The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created. SourceServerId *string `pulumi:"sourceServerId"` // The size of the data disk space for the MongoDB Cluster. StorageSizeInGb *int `pulumi:"storageSizeInGb"` // The storage type for the MongoDB Cluster. Possible values are `PremiumSSD` and `PremiumSSDv2`. Defaults to `PremiumSSD`. Changing this forces a new resource to be created. StorageType *string `pulumi:"storageType"` // A mapping of tags to assign to the MongoDB Cluster. Tags map[string]string `pulumi:"tags"` // The version for the MongoDB Cluster. Possibles values are `5.0`, `6.0`, `7.0` and `8.0`. Version *string `pulumi:"version"` } type MongoClusterState struct { // The Password associated with the `administratorUsername` for the MongoDB Cluster. AdministratorPassword pulumi.StringPtrInput // The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created. AdministratorUsername pulumi.StringPtrInput // A list of allowed authentication modes for the MongoDB Cluster. Possible values are `NativeAuth` and `MicrosoftEntraID`. AuthenticationMethods pulumi.StringArrayInput // The compute tier to assign to the MongoDB Cluster. Possible values are `Free`, `M10`, `M20`, `M25`, `M30`, `M40`, `M50`, `M60`, `M80`, and `M200`. ComputeTier pulumi.StringPtrInput // One or more `connectionStrings` blocks as defined below. ConnectionStrings MongoClusterConnectionStringArrayInput // The creation mode for the MongoDB Cluster. Possible values are `Default`, `GeoReplica` and `PointInTimeRestore`. Defaults to `Default`. Changing this forces a new resource to be created. CreateMode pulumi.StringPtrInput // A `customerManagedKey` block as defined below. Changing this forces a new resource to be created. CustomerManagedKey MongoClusterCustomerManagedKeyPtrInput // Is the Data API for the MongoDB Cluster enabled? Defaults to `false`. // // > **Note:** `dataApiModeEnabled` can only be set when `createMode` is `Default`. Once enabled, it can only be disabled by recreating the resource. DataApiModeEnabled pulumi.BoolPtrInput // The high availability mode for the MongoDB Cluster. Possibles values are `Disabled` and `ZoneRedundantPreferred`. HighAvailabilityMode pulumi.StringPtrInput // An `identity` block as detailed below. // // > **Note:** When adding or removing `identity`, a resource recreation will be triggered. Identity MongoClusterIdentityPtrInput // The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created. PreviewFeatures pulumi.StringArrayInput // The Public Network Access setting for the MongoDB Cluster. Possibles values are `Disabled` and `Enabled`. Defaults to `Enabled`. PublicNetworkAccess pulumi.StringPtrInput // The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput Restore MongoClusterRestorePtrInput // The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created. ShardCount pulumi.IntPtrInput // The location of the source MongoDB Cluster. Changing this forces a new resource to be created. SourceLocation pulumi.StringPtrInput // The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created. SourceServerId pulumi.StringPtrInput // The size of the data disk space for the MongoDB Cluster. StorageSizeInGb pulumi.IntPtrInput // The storage type for the MongoDB Cluster. Possible values are `PremiumSSD` and `PremiumSSDv2`. Defaults to `PremiumSSD`. Changing this forces a new resource to be created. StorageType pulumi.StringPtrInput // A mapping of tags to assign to the MongoDB Cluster. Tags pulumi.StringMapInput // The version for the MongoDB Cluster. Possibles values are `5.0`, `6.0`, `7.0` and `8.0`. Version pulumi.StringPtrInput } func (MongoClusterState) ElementType() reflect.Type { return reflect.TypeOf((*mongoClusterState)(nil)).Elem() } type mongoClusterArgs struct { // The Password associated with the `administratorUsername` for the MongoDB Cluster. AdministratorPassword *string `pulumi:"administratorPassword"` // The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created. AdministratorUsername *string `pulumi:"administratorUsername"` // A list of allowed authentication modes for the MongoDB Cluster. Possible values are `NativeAuth` and `MicrosoftEntraID`. AuthenticationMethods []string `pulumi:"authenticationMethods"` // The compute tier to assign to the MongoDB Cluster. Possible values are `Free`, `M10`, `M20`, `M25`, `M30`, `M40`, `M50`, `M60`, `M80`, and `M200`. ComputeTier *string `pulumi:"computeTier"` // The creation mode for the MongoDB Cluster. Possible values are `Default`, `GeoReplica` and `PointInTimeRestore`. Defaults to `Default`. Changing this forces a new resource to be created. CreateMode *string `pulumi:"createMode"` // A `customerManagedKey` block as defined below. Changing this forces a new resource to be created. CustomerManagedKey *MongoClusterCustomerManagedKey `pulumi:"customerManagedKey"` // Is the Data API for the MongoDB Cluster enabled? Defaults to `false`. // // > **Note:** `dataApiModeEnabled` can only be set when `createMode` is `Default`. Once enabled, it can only be disabled by recreating the resource. DataApiModeEnabled *bool `pulumi:"dataApiModeEnabled"` // The high availability mode for the MongoDB Cluster. Possibles values are `Disabled` and `ZoneRedundantPreferred`. HighAvailabilityMode *string `pulumi:"highAvailabilityMode"` // An `identity` block as detailed below. // // > **Note:** When adding or removing `identity`, a resource recreation will be triggered. Identity *MongoClusterIdentity `pulumi:"identity"` // The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created. PreviewFeatures []string `pulumi:"previewFeatures"` // The Public Network Access setting for the MongoDB Cluster. Possibles values are `Disabled` and `Enabled`. Defaults to `Enabled`. PublicNetworkAccess *string `pulumi:"publicNetworkAccess"` // The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` Restore *MongoClusterRestore `pulumi:"restore"` // The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created. ShardCount *int `pulumi:"shardCount"` // The location of the source MongoDB Cluster. Changing this forces a new resource to be created. SourceLocation *string `pulumi:"sourceLocation"` // The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created. SourceServerId *string `pulumi:"sourceServerId"` // The size of the data disk space for the MongoDB Cluster. StorageSizeInGb *int `pulumi:"storageSizeInGb"` // The storage type for the MongoDB Cluster. Possible values are `PremiumSSD` and `PremiumSSDv2`. Defaults to `PremiumSSD`. Changing this forces a new resource to be created. StorageType *string `pulumi:"storageType"` // A mapping of tags to assign to the MongoDB Cluster. Tags map[string]string `pulumi:"tags"` // The version for the MongoDB Cluster. Possibles values are `5.0`, `6.0`, `7.0` and `8.0`. Version *string `pulumi:"version"` } // The set of arguments for constructing a MongoCluster resource. type MongoClusterArgs struct { // The Password associated with the `administratorUsername` for the MongoDB Cluster. AdministratorPassword pulumi.StringPtrInput // The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created. AdministratorUsername pulumi.StringPtrInput // A list of allowed authentication modes for the MongoDB Cluster. Possible values are `NativeAuth` and `MicrosoftEntraID`. AuthenticationMethods pulumi.StringArrayInput // The compute tier to assign to the MongoDB Cluster. Possible values are `Free`, `M10`, `M20`, `M25`, `M30`, `M40`, `M50`, `M60`, `M80`, and `M200`. ComputeTier pulumi.StringPtrInput // The creation mode for the MongoDB Cluster. Possible values are `Default`, `GeoReplica` and `PointInTimeRestore`. Defaults to `Default`. Changing this forces a new resource to be created. CreateMode pulumi.StringPtrInput // A `customerManagedKey` block as defined below. Changing this forces a new resource to be created. CustomerManagedKey MongoClusterCustomerManagedKeyPtrInput // Is the Data API for the MongoDB Cluster enabled? Defaults to `false`. // // > **Note:** `dataApiModeEnabled` can only be set when `createMode` is `Default`. Once enabled, it can only be disabled by recreating the resource. DataApiModeEnabled pulumi.BoolPtrInput // The high availability mode for the MongoDB Cluster. Possibles values are `Disabled` and `ZoneRedundantPreferred`. HighAvailabilityMode pulumi.StringPtrInput // An `identity` block as detailed below. // // > **Note:** When adding or removing `identity`, a resource recreation will be triggered. Identity MongoClusterIdentityPtrInput // The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created. PreviewFeatures pulumi.StringArrayInput // The Public Network Access setting for the MongoDB Cluster. Possibles values are `Disabled` and `Enabled`. Defaults to `Enabled`. PublicNetworkAccess pulumi.StringPtrInput // The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput Restore MongoClusterRestorePtrInput // The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created. ShardCount pulumi.IntPtrInput // The location of the source MongoDB Cluster. Changing this forces a new resource to be created. SourceLocation pulumi.StringPtrInput // The ID of the replication source MongoDB Cluster. Changing this forces a new resource to be created. SourceServerId pulumi.StringPtrInput // The size of the data disk space for the MongoDB Cluster. StorageSizeInGb pulumi.IntPtrInput // The storage type for the MongoDB Cluster. Possible values are `PremiumSSD` and `PremiumSSDv2`. Defaults to `PremiumSSD`. Changing this forces a new resource to be created. StorageType pulumi.StringPtrInput // A mapping of tags to assign to the MongoDB Cluster. Tags pulumi.StringMapInput // The version for the MongoDB Cluster. Possibles values are `5.0`, `6.0`, `7.0` and `8.0`. Version pulumi.StringPtrInput } func (MongoClusterArgs) ElementType() reflect.Type { return reflect.TypeOf((*mongoClusterArgs)(nil)).Elem() } type MongoClusterInput interface { pulumi.Input ToMongoClusterOutput() MongoClusterOutput ToMongoClusterOutputWithContext(ctx context.Context) MongoClusterOutput } func (*MongoCluster) ElementType() reflect.Type { return reflect.TypeOf((**MongoCluster)(nil)).Elem() } func (i *MongoCluster) ToMongoClusterOutput() MongoClusterOutput { return i.ToMongoClusterOutputWithContext(context.Background()) } func (i *MongoCluster) ToMongoClusterOutputWithContext(ctx context.Context) MongoClusterOutput { return pulumi.ToOutputWithContext(ctx, i).(MongoClusterOutput) } // MongoClusterArrayInput is an input type that accepts MongoClusterArray and MongoClusterArrayOutput values. // You can construct a concrete instance of `MongoClusterArrayInput` via: // // MongoClusterArray{ MongoClusterArgs{...} } type MongoClusterArrayInput interface { pulumi.Input ToMongoClusterArrayOutput() MongoClusterArrayOutput ToMongoClusterArrayOutputWithContext(context.Context) MongoClusterArrayOutput } type MongoClusterArray []MongoClusterInput func (MongoClusterArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*MongoCluster)(nil)).Elem() } func (i MongoClusterArray) ToMongoClusterArrayOutput() MongoClusterArrayOutput { return i.ToMongoClusterArrayOutputWithContext(context.Background()) } func (i MongoClusterArray) ToMongoClusterArrayOutputWithContext(ctx context.Context) MongoClusterArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(MongoClusterArrayOutput) } // MongoClusterMapInput is an input type that accepts MongoClusterMap and MongoClusterMapOutput values. // You can construct a concrete instance of `MongoClusterMapInput` via: // // MongoClusterMap{ "key": MongoClusterArgs{...} } type MongoClusterMapInput interface { pulumi.Input ToMongoClusterMapOutput() MongoClusterMapOutput ToMongoClusterMapOutputWithContext(context.Context) MongoClusterMapOutput } type MongoClusterMap map[string]MongoClusterInput func (MongoClusterMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*MongoCluster)(nil)).Elem() } func (i MongoClusterMap) ToMongoClusterMapOutput() MongoClusterMapOutput { return i.ToMongoClusterMapOutputWithContext(context.Background()) } func (i MongoClusterMap) ToMongoClusterMapOutputWithContext(ctx context.Context) MongoClusterMapOutput { return pulumi.ToOutputWithContext(ctx, i).(MongoClusterMapOutput) } type MongoClusterOutput struct{ *pulumi.OutputState } func (MongoClusterOutput) ElementType() reflect.Type { return reflect.TypeOf((**MongoCluster)(nil)).Elem() } func (o MongoClusterOutput) ToMongoClusterOutput() MongoClusterOutput { return o } func (o MongoClusterOutput) ToMongoClusterOutputWithContext(ctx context.Context) MongoClusterOutput { return o } // The Password associated with the `administratorUsername` for the MongoDB Cluster. func (o MongoClusterOutput) AdministratorPassword() pulumi.StringPtrOutput { return o.ApplyT(func(v *MongoCluster) pulumi.StringPtrOutput { return v.AdministratorPassword }).(pulumi.StringPtrOutput) } // The administrator username of the MongoDB Cluster. Changing this forces a new resource to be created. func (o MongoClusterOutput) AdministratorUsername() pulumi.StringPtrOutput { return o.ApplyT(func(v *MongoCluster) pulumi.StringPtrOutput { return v.AdministratorUsername }).(pulumi.StringPtrOutput) } // A list of allowed authentication modes for the MongoDB Cluster. Possible values are `NativeAuth` and `MicrosoftEntraID`. func (o MongoClusterOutput) AuthenticationMethods() pulumi.StringArrayOutput { return o.ApplyT(func(v *MongoCluster) pulumi.StringArrayOutput { return v.AuthenticationMethods }).(pulumi.StringArrayOutput) } // The compute tier to assign to the MongoDB Cluster. Possible values are `Free`, `M10`, `M20`, `M25`, `M30`, `M40`, `M50`, `M60`, `M80`, and `M200`. func (o MongoClusterOutput) ComputeTier() pulumi.StringPtrOutput { return o.ApplyT(func(v *MongoCluster) pulumi.StringPtrOutput { return v.ComputeTier }).(pulumi.StringPtrOutput) } // One or more `connectionStrings` blocks as defined below. func (o MongoClusterOutput) ConnectionStrings() MongoClusterConnectionStringArrayOutput { return o.ApplyT(func(v *MongoCluster) MongoClusterConnectionStringArrayOutput { return v.ConnectionStrings }).(MongoClusterConnectionStringArrayOutput) } // The creation mode for the MongoDB Cluster. Possible values are `Default`, `GeoReplica` and `PointInTimeRestore`. Defaults to `Default`. Changing this forces a new resource to be created. func (o MongoClusterOutput) CreateMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *MongoCluster) pulumi.StringPtrOutput { return v.CreateMode }).(pulumi.StringPtrOutput) } // A `customerManagedKey` block as defined below. Changing this forces a new resource to be created. func (o MongoClusterOutput) CustomerManagedKey() MongoClusterCustomerManagedKeyPtrOutput { return o.ApplyT(func(v *MongoCluster) MongoClusterCustomerManagedKeyPtrOutput { return v.CustomerManagedKey }).(MongoClusterCustomerManagedKeyPtrOutput) } // Is the Data API for the MongoDB Cluster enabled? Defaults to `false`. // // > **Note:** `dataApiModeEnabled` can only be set when `createMode` is `Default`. Once enabled, it can only be disabled by recreating the resource. func (o MongoClusterOutput) DataApiModeEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *MongoCluster) pulumi.BoolPtrOutput { return v.DataApiModeEnabled }).(pulumi.BoolPtrOutput) } // The high availability mode for the MongoDB Cluster. Possibles values are `Disabled` and `ZoneRedundantPreferred`. func (o MongoClusterOutput) HighAvailabilityMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *MongoCluster) pulumi.StringPtrOutput { return v.HighAvailabilityMode }).(pulumi.StringPtrOutput) } // An `identity` block as detailed below. // // > **Note:** When adding or removing `identity`, a resource recreation will be triggered. func (o MongoClusterOutput) Identity() MongoClusterIdentityPtrOutput { return o.ApplyT(func(v *MongoCluster) MongoClusterIdentityPtrOutput { return v.Identity }).(MongoClusterIdentityPtrOutput) } // The supported Azure location where the MongoDB Cluster exists. Changing this forces a new resource to be created. func (o MongoClusterOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *MongoCluster) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for the MongoDB Cluster. Changing this forces a new resource to be created. func (o MongoClusterOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *MongoCluster) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The preview features that can be enabled on the MongoDB Cluster. Changing this forces a new resource to be created. func (o MongoClusterOutput) PreviewFeatures() pulumi.StringArrayOutput { return o.ApplyT(func(v *MongoCluster) pulumi.StringArrayOutput { return v.PreviewFeatures }).(pulumi.StringArrayOutput) } // The Public Network Access setting for the MongoDB Cluster. Possibles values are `Disabled` and `Enabled`. Defaults to `Enabled`. func (o MongoClusterOutput) PublicNetworkAccess() pulumi.StringPtrOutput { return o.ApplyT(func(v *MongoCluster) pulumi.StringPtrOutput { return v.PublicNetworkAccess }).(pulumi.StringPtrOutput) } // The name of the resource group in which to create the MongoDB Cluster. Changing this forces a new resource to be created. func (o MongoClusterOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *MongoCluster) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } func (o MongoClusterOutput) Restore() MongoClusterRestorePtrOutput { return o.ApplyT(func(v *MongoCluster) MongoClusterRestorePtrOutput { return v.Restore }).(MongoClusterRestorePtrOutput) } // The Number of shards to provision on the MongoDB Cluster. Changing this forces a new resource to be created. func (o MongoClusterOutput) ShardCount() 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/mongocluster/user.go
sdk/go/azure/mongocluster/user.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 mongocluster import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Mongo Cluster User. // // ## 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/mongocluster" // "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 // } // exampleMongoCluster, err := mongocluster.NewMongoCluster(ctx, "example", &mongocluster.MongoClusterArgs{ // Name: pulumi.String("example-mc"), // ResourceGroupName: example.Name, // Location: example.Location, // AdministratorUsername: pulumi.String("adminTerraform"), // AdministratorPassword: pulumi.String("QAZwsx123"), // ShardCount: pulumi.Int(1), // ComputeTier: pulumi.String("M30"), // HighAvailabilityMode: pulumi.String("Disabled"), // StorageSizeInGb: pulumi.Int(32), // Version: pulumi.String("8.0"), // AuthenticationMethods: pulumi.StringArray{ // pulumi.String("NativeAuth"), // pulumi.String("MicrosoftEntraID"), // }, // }) // if err != nil { // return err // } // _, err = mongocluster.NewUser(ctx, "example", &mongocluster.UserArgs{ // ObjectId: pulumi.String(current.ObjectId), // MongoClusterId: exampleMongoCluster.ID(), // IdentityProviderType: pulumi.String("MicrosoftEntraID"), // PrincipalType: pulumi.String("servicePrincipal"), // Roles: mongocluster.UserRoleArray{ // &mongocluster.UserRoleArgs{ // Database: pulumi.String("admin"), // Name: pulumi.String("root"), // }, // }, // }) // 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.DocumentDB` - 2025-09-01 // // ## Import // // Mongo Cluster Users can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:mongocluster/user:User example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DocumentDB/mongoClusters/cluster1/users/user1 // ``` type User struct { pulumi.CustomResourceState // The identity provider type for the Mongo Cluster User. The only possible value is `MicrosoftEntraID`. Changing this forces a new resource to be created. IdentityProviderType pulumi.StringOutput `pulumi:"identityProviderType"` // The ID of the Mongo Cluster where the User should exist. Changing this forces a new resource to be created. MongoClusterId pulumi.StringOutput `pulumi:"mongoClusterId"` // The Object ID of the Entra ID User or Service Principal. Changing this forces a new resource to be created. ObjectId pulumi.StringOutput `pulumi:"objectId"` // The principal type for the Mongo Cluster User. Possible values are `user` and `servicePrincipal`. Changing this forces a new resource to be created. PrincipalType pulumi.StringOutput `pulumi:"principalType"` // One or more `role` blocks as defined below. Changing this forces a new resource to be created. Roles UserRoleArrayOutput `pulumi:"roles"` } // NewUser registers a new resource with the given unique name, arguments, and options. func NewUser(ctx *pulumi.Context, name string, args *UserArgs, opts ...pulumi.ResourceOption) (*User, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.IdentityProviderType == nil { return nil, errors.New("invalid value for required argument 'IdentityProviderType'") } if args.MongoClusterId == nil { return nil, errors.New("invalid value for required argument 'MongoClusterId'") } if args.ObjectId == nil { return nil, errors.New("invalid value for required argument 'ObjectId'") } if args.PrincipalType == nil { return nil, errors.New("invalid value for required argument 'PrincipalType'") } if args.Roles == nil { return nil, errors.New("invalid value for required argument 'Roles'") } opts = internal.PkgResourceDefaultOpts(opts) var resource User err := ctx.RegisterResource("azure:mongocluster/user:User", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetUser gets an existing User 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 GetUser(ctx *pulumi.Context, name string, id pulumi.IDInput, state *UserState, opts ...pulumi.ResourceOption) (*User, error) { var resource User err := ctx.ReadResource("azure:mongocluster/user:User", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering User resources. type userState struct { // The identity provider type for the Mongo Cluster User. The only possible value is `MicrosoftEntraID`. Changing this forces a new resource to be created. IdentityProviderType *string `pulumi:"identityProviderType"` // The ID of the Mongo Cluster where the User should exist. Changing this forces a new resource to be created. MongoClusterId *string `pulumi:"mongoClusterId"` // The Object ID of the Entra ID User or Service Principal. Changing this forces a new resource to be created. ObjectId *string `pulumi:"objectId"` // The principal type for the Mongo Cluster User. Possible values are `user` and `servicePrincipal`. Changing this forces a new resource to be created. PrincipalType *string `pulumi:"principalType"` // One or more `role` blocks as defined below. Changing this forces a new resource to be created. Roles []UserRole `pulumi:"roles"` } type UserState struct { // The identity provider type for the Mongo Cluster User. The only possible value is `MicrosoftEntraID`. Changing this forces a new resource to be created. IdentityProviderType pulumi.StringPtrInput // The ID of the Mongo Cluster where the User should exist. Changing this forces a new resource to be created. MongoClusterId pulumi.StringPtrInput // The Object ID of the Entra ID User or Service Principal. Changing this forces a new resource to be created. ObjectId pulumi.StringPtrInput // The principal type for the Mongo Cluster User. Possible values are `user` and `servicePrincipal`. Changing this forces a new resource to be created. PrincipalType pulumi.StringPtrInput // One or more `role` blocks as defined below. Changing this forces a new resource to be created. Roles UserRoleArrayInput } func (UserState) ElementType() reflect.Type { return reflect.TypeOf((*userState)(nil)).Elem() } type userArgs struct { // The identity provider type for the Mongo Cluster User. The only possible value is `MicrosoftEntraID`. Changing this forces a new resource to be created. IdentityProviderType string `pulumi:"identityProviderType"` // The ID of the Mongo Cluster where the User should exist. Changing this forces a new resource to be created. MongoClusterId string `pulumi:"mongoClusterId"` // The Object ID of the Entra ID User or Service Principal. Changing this forces a new resource to be created. ObjectId string `pulumi:"objectId"` // The principal type for the Mongo Cluster User. Possible values are `user` and `servicePrincipal`. Changing this forces a new resource to be created. PrincipalType string `pulumi:"principalType"` // One or more `role` blocks as defined below. Changing this forces a new resource to be created. Roles []UserRole `pulumi:"roles"` } // The set of arguments for constructing a User resource. type UserArgs struct { // The identity provider type for the Mongo Cluster User. The only possible value is `MicrosoftEntraID`. Changing this forces a new resource to be created. IdentityProviderType pulumi.StringInput // The ID of the Mongo Cluster where the User should exist. Changing this forces a new resource to be created. MongoClusterId pulumi.StringInput // The Object ID of the Entra ID User or Service Principal. Changing this forces a new resource to be created. ObjectId pulumi.StringInput // The principal type for the Mongo Cluster User. Possible values are `user` and `servicePrincipal`. Changing this forces a new resource to be created. PrincipalType pulumi.StringInput // One or more `role` blocks as defined below. Changing this forces a new resource to be created. Roles UserRoleArrayInput } func (UserArgs) ElementType() reflect.Type { return reflect.TypeOf((*userArgs)(nil)).Elem() } type UserInput interface { pulumi.Input ToUserOutput() UserOutput ToUserOutputWithContext(ctx context.Context) UserOutput } func (*User) ElementType() reflect.Type { return reflect.TypeOf((**User)(nil)).Elem() } func (i *User) ToUserOutput() UserOutput { return i.ToUserOutputWithContext(context.Background()) } func (i *User) ToUserOutputWithContext(ctx context.Context) UserOutput { return pulumi.ToOutputWithContext(ctx, i).(UserOutput) } // UserArrayInput is an input type that accepts UserArray and UserArrayOutput values. // You can construct a concrete instance of `UserArrayInput` via: // // UserArray{ UserArgs{...} } type UserArrayInput interface { pulumi.Input ToUserArrayOutput() UserArrayOutput ToUserArrayOutputWithContext(context.Context) UserArrayOutput } type UserArray []UserInput func (UserArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*User)(nil)).Elem() } func (i UserArray) ToUserArrayOutput() UserArrayOutput { return i.ToUserArrayOutputWithContext(context.Background()) } func (i UserArray) ToUserArrayOutputWithContext(ctx context.Context) UserArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(UserArrayOutput) } // UserMapInput is an input type that accepts UserMap and UserMapOutput values. // You can construct a concrete instance of `UserMapInput` via: // // UserMap{ "key": UserArgs{...} } type UserMapInput interface { pulumi.Input ToUserMapOutput() UserMapOutput ToUserMapOutputWithContext(context.Context) UserMapOutput } type UserMap map[string]UserInput func (UserMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*User)(nil)).Elem() } func (i UserMap) ToUserMapOutput() UserMapOutput { return i.ToUserMapOutputWithContext(context.Background()) } func (i UserMap) ToUserMapOutputWithContext(ctx context.Context) UserMapOutput { return pulumi.ToOutputWithContext(ctx, i).(UserMapOutput) } type UserOutput struct{ *pulumi.OutputState } func (UserOutput) ElementType() reflect.Type { return reflect.TypeOf((**User)(nil)).Elem() } func (o UserOutput) ToUserOutput() UserOutput { return o } func (o UserOutput) ToUserOutputWithContext(ctx context.Context) UserOutput { return o } // The identity provider type for the Mongo Cluster User. The only possible value is `MicrosoftEntraID`. Changing this forces a new resource to be created. func (o UserOutput) IdentityProviderType() pulumi.StringOutput { return o.ApplyT(func(v *User) pulumi.StringOutput { return v.IdentityProviderType }).(pulumi.StringOutput) } // The ID of the Mongo Cluster where the User should exist. Changing this forces a new resource to be created. func (o UserOutput) MongoClusterId() pulumi.StringOutput { return o.ApplyT(func(v *User) pulumi.StringOutput { return v.MongoClusterId }).(pulumi.StringOutput) } // The Object ID of the Entra ID User or Service Principal. Changing this forces a new resource to be created. func (o UserOutput) ObjectId() pulumi.StringOutput { return o.ApplyT(func(v *User) pulumi.StringOutput { return v.ObjectId }).(pulumi.StringOutput) } // The principal type for the Mongo Cluster User. Possible values are `user` and `servicePrincipal`. Changing this forces a new resource to be created. func (o UserOutput) PrincipalType() pulumi.StringOutput { return o.ApplyT(func(v *User) pulumi.StringOutput { return v.PrincipalType }).(pulumi.StringOutput) } // One or more `role` blocks as defined below. Changing this forces a new resource to be created. func (o UserOutput) Roles() UserRoleArrayOutput { return o.ApplyT(func(v *User) UserRoleArrayOutput { return v.Roles }).(UserRoleArrayOutput) } type UserArrayOutput struct{ *pulumi.OutputState } func (UserArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*User)(nil)).Elem() } func (o UserArrayOutput) ToUserArrayOutput() UserArrayOutput { return o } func (o UserArrayOutput) ToUserArrayOutputWithContext(ctx context.Context) UserArrayOutput { return o } func (o UserArrayOutput) Index(i pulumi.IntInput) UserOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *User { return vs[0].([]*User)[vs[1].(int)] }).(UserOutput) } type UserMapOutput struct{ *pulumi.OutputState } func (UserMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*User)(nil)).Elem() } func (o UserMapOutput) ToUserMapOutput() UserMapOutput { return o } func (o UserMapOutput) ToUserMapOutputWithContext(ctx context.Context) UserMapOutput { return o } func (o UserMapOutput) MapIndex(k pulumi.StringInput) UserOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *User { return vs[0].(map[string]*User)[vs[1].(string)] }).(UserOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*UserInput)(nil)).Elem(), &User{}) pulumi.RegisterInputType(reflect.TypeOf((*UserArrayInput)(nil)).Elem(), UserArray{}) pulumi.RegisterInputType(reflect.TypeOf((*UserMapInput)(nil)).Elem(), UserMap{}) pulumi.RegisterOutputType(UserOutput{}) pulumi.RegisterOutputType(UserArrayOutput{}) pulumi.RegisterOutputType(UserMapOutput{}) }
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/mongocluster/firewallRule.go
sdk/go/azure/mongocluster/firewallRule.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 mongocluster import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Mongo Cluster Firewall 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/mongocluster" // "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 // } // exampleMongoCluster, err := mongocluster.NewMongoCluster(ctx, "example", &mongocluster.MongoClusterArgs{ // Name: pulumi.String("example-mongocluster"), // ResourceGroupName: example.Name, // Location: example.Location, // AdministratorUsername: pulumi.String("adminuser"), // AdministratorPassword: pulumi.String("P@ssw0rd1234!"), // ShardCount: pulumi.Int(1), // ComputeTier: pulumi.String("M30"), // HighAvailabilityMode: pulumi.String("Disabled"), // StorageSizeInGb: pulumi.Int(32), // Version: pulumi.String("7.0"), // }) // if err != nil { // return err // } // _, err = mongocluster.NewFirewallRule(ctx, "example", &mongocluster.FirewallRuleArgs{ // Name: pulumi.String("example-firewall-rule"), // MongoClusterId: exampleMongoCluster.ID(), // StartIpAddress: pulumi.String("10.0.0.1"), // EndIpAddress: pulumi.String("10.0.0.255"), // }) // 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.DocumentDB` - 2025-09-01 // // ## Import // // Mongo Cluster Firewall Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:mongocluster/firewallRule:FirewallRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DocumentDB/mongoClusters/cluster1/firewallRules/rule1 // ``` type FirewallRule struct { pulumi.CustomResourceState // The end IP address of the Mongo Cluster Firewall Rule. EndIpAddress pulumi.StringOutput `pulumi:"endIpAddress"` // The ID of the Mongo Cluster. Changing this forces a new resource to be created. MongoClusterId pulumi.StringOutput `pulumi:"mongoClusterId"` // The name of the Mongo Cluster Firewall Rule. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The start IP address of the Mongo Cluster Firewall Rule. StartIpAddress pulumi.StringOutput `pulumi:"startIpAddress"` } // NewFirewallRule registers a new resource with the given unique name, arguments, and options. func NewFirewallRule(ctx *pulumi.Context, name string, args *FirewallRuleArgs, opts ...pulumi.ResourceOption) (*FirewallRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.EndIpAddress == nil { return nil, errors.New("invalid value for required argument 'EndIpAddress'") } if args.MongoClusterId == nil { return nil, errors.New("invalid value for required argument 'MongoClusterId'") } if args.StartIpAddress == nil { return nil, errors.New("invalid value for required argument 'StartIpAddress'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FirewallRule err := ctx.RegisterResource("azure:mongocluster/firewallRule:FirewallRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFirewallRule gets an existing FirewallRule 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 GetFirewallRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FirewallRuleState, opts ...pulumi.ResourceOption) (*FirewallRule, error) { var resource FirewallRule err := ctx.ReadResource("azure:mongocluster/firewallRule:FirewallRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FirewallRule resources. type firewallRuleState struct { // The end IP address of the Mongo Cluster Firewall Rule. EndIpAddress *string `pulumi:"endIpAddress"` // The ID of the Mongo Cluster. Changing this forces a new resource to be created. MongoClusterId *string `pulumi:"mongoClusterId"` // The name of the Mongo Cluster Firewall Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The start IP address of the Mongo Cluster Firewall Rule. StartIpAddress *string `pulumi:"startIpAddress"` } type FirewallRuleState struct { // The end IP address of the Mongo Cluster Firewall Rule. EndIpAddress pulumi.StringPtrInput // The ID of the Mongo Cluster. Changing this forces a new resource to be created. MongoClusterId pulumi.StringPtrInput // The name of the Mongo Cluster Firewall Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The start IP address of the Mongo Cluster Firewall Rule. StartIpAddress pulumi.StringPtrInput } func (FirewallRuleState) ElementType() reflect.Type { return reflect.TypeOf((*firewallRuleState)(nil)).Elem() } type firewallRuleArgs struct { // The end IP address of the Mongo Cluster Firewall Rule. EndIpAddress string `pulumi:"endIpAddress"` // The ID of the Mongo Cluster. Changing this forces a new resource to be created. MongoClusterId string `pulumi:"mongoClusterId"` // The name of the Mongo Cluster Firewall Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The start IP address of the Mongo Cluster Firewall Rule. StartIpAddress string `pulumi:"startIpAddress"` } // The set of arguments for constructing a FirewallRule resource. type FirewallRuleArgs struct { // The end IP address of the Mongo Cluster Firewall Rule. EndIpAddress pulumi.StringInput // The ID of the Mongo Cluster. Changing this forces a new resource to be created. MongoClusterId pulumi.StringInput // The name of the Mongo Cluster Firewall Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The start IP address of the Mongo Cluster Firewall Rule. StartIpAddress pulumi.StringInput } func (FirewallRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*firewallRuleArgs)(nil)).Elem() } type FirewallRuleInput interface { pulumi.Input ToFirewallRuleOutput() FirewallRuleOutput ToFirewallRuleOutputWithContext(ctx context.Context) FirewallRuleOutput } func (*FirewallRule) ElementType() reflect.Type { return reflect.TypeOf((**FirewallRule)(nil)).Elem() } func (i *FirewallRule) ToFirewallRuleOutput() FirewallRuleOutput { return i.ToFirewallRuleOutputWithContext(context.Background()) } func (i *FirewallRule) ToFirewallRuleOutputWithContext(ctx context.Context) FirewallRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallRuleOutput) } // FirewallRuleArrayInput is an input type that accepts FirewallRuleArray and FirewallRuleArrayOutput values. // You can construct a concrete instance of `FirewallRuleArrayInput` via: // // FirewallRuleArray{ FirewallRuleArgs{...} } type FirewallRuleArrayInput interface { pulumi.Input ToFirewallRuleArrayOutput() FirewallRuleArrayOutput ToFirewallRuleArrayOutputWithContext(context.Context) FirewallRuleArrayOutput } type FirewallRuleArray []FirewallRuleInput func (FirewallRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FirewallRule)(nil)).Elem() } func (i FirewallRuleArray) ToFirewallRuleArrayOutput() FirewallRuleArrayOutput { return i.ToFirewallRuleArrayOutputWithContext(context.Background()) } func (i FirewallRuleArray) ToFirewallRuleArrayOutputWithContext(ctx context.Context) FirewallRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallRuleArrayOutput) } // FirewallRuleMapInput is an input type that accepts FirewallRuleMap and FirewallRuleMapOutput values. // You can construct a concrete instance of `FirewallRuleMapInput` via: // // FirewallRuleMap{ "key": FirewallRuleArgs{...} } type FirewallRuleMapInput interface { pulumi.Input ToFirewallRuleMapOutput() FirewallRuleMapOutput ToFirewallRuleMapOutputWithContext(context.Context) FirewallRuleMapOutput } type FirewallRuleMap map[string]FirewallRuleInput func (FirewallRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FirewallRule)(nil)).Elem() } func (i FirewallRuleMap) ToFirewallRuleMapOutput() FirewallRuleMapOutput { return i.ToFirewallRuleMapOutputWithContext(context.Background()) } func (i FirewallRuleMap) ToFirewallRuleMapOutputWithContext(ctx context.Context) FirewallRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallRuleMapOutput) } type FirewallRuleOutput struct{ *pulumi.OutputState } func (FirewallRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**FirewallRule)(nil)).Elem() } func (o FirewallRuleOutput) ToFirewallRuleOutput() FirewallRuleOutput { return o } func (o FirewallRuleOutput) ToFirewallRuleOutputWithContext(ctx context.Context) FirewallRuleOutput { return o } // The end IP address of the Mongo Cluster Firewall Rule. func (o FirewallRuleOutput) EndIpAddress() pulumi.StringOutput { return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.EndIpAddress }).(pulumi.StringOutput) } // The ID of the Mongo Cluster. Changing this forces a new resource to be created. func (o FirewallRuleOutput) MongoClusterId() pulumi.StringOutput { return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.MongoClusterId }).(pulumi.StringOutput) } // The name of the Mongo Cluster Firewall Rule. Changing this forces a new resource to be created. func (o FirewallRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The start IP address of the Mongo Cluster Firewall Rule. func (o FirewallRuleOutput) StartIpAddress() pulumi.StringOutput { return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.StartIpAddress }).(pulumi.StringOutput) } type FirewallRuleArrayOutput struct{ *pulumi.OutputState } func (FirewallRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FirewallRule)(nil)).Elem() } func (o FirewallRuleArrayOutput) ToFirewallRuleArrayOutput() FirewallRuleArrayOutput { return o } func (o FirewallRuleArrayOutput) ToFirewallRuleArrayOutputWithContext(ctx context.Context) FirewallRuleArrayOutput { return o } func (o FirewallRuleArrayOutput) Index(i pulumi.IntInput) FirewallRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FirewallRule { return vs[0].([]*FirewallRule)[vs[1].(int)] }).(FirewallRuleOutput) } type FirewallRuleMapOutput struct{ *pulumi.OutputState } func (FirewallRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FirewallRule)(nil)).Elem() } func (o FirewallRuleMapOutput) ToFirewallRuleMapOutput() FirewallRuleMapOutput { return o } func (o FirewallRuleMapOutput) ToFirewallRuleMapOutputWithContext(ctx context.Context) FirewallRuleMapOutput { return o } func (o FirewallRuleMapOutput) MapIndex(k pulumi.StringInput) FirewallRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FirewallRule { return vs[0].(map[string]*FirewallRule)[vs[1].(string)] }).(FirewallRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FirewallRuleInput)(nil)).Elem(), &FirewallRule{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallRuleArrayInput)(nil)).Elem(), FirewallRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallRuleMapInput)(nil)).Elem(), FirewallRuleMap{}) pulumi.RegisterOutputType(FirewallRuleOutput{}) pulumi.RegisterOutputType(FirewallRuleArrayOutput{}) pulumi.RegisterOutputType(FirewallRuleMapOutput{}) }
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/streamanalytics/init.go
sdk/go/azure/streamanalytics/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 streamanalytics 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:streamanalytics/cluster:Cluster": r = &Cluster{} case "azure:streamanalytics/functionJavaScriptUDF:FunctionJavaScriptUDF": r = &FunctionJavaScriptUDF{} case "azure:streamanalytics/functionJavascriptUda:FunctionJavascriptUda": r = &FunctionJavascriptUda{} case "azure:streamanalytics/job:Job": r = &Job{} case "azure:streamanalytics/jobSchedule:JobSchedule": r = &JobSchedule{} case "azure:streamanalytics/jobStorageAccount:JobStorageAccount": r = &JobStorageAccount{} case "azure:streamanalytics/managedPrivateEndpoint:ManagedPrivateEndpoint": r = &ManagedPrivateEndpoint{} case "azure:streamanalytics/outputBlob:OutputBlob": r = &OutputBlob{} case "azure:streamanalytics/outputCosmosdb:OutputCosmosdb": r = &OutputCosmosdb{} case "azure:streamanalytics/outputEventHub:OutputEventHub": r = &OutputEventHub{} case "azure:streamanalytics/outputFunction:OutputFunction": r = &OutputFunction{} case "azure:streamanalytics/outputMssql:OutputMssql": r = &OutputMssql{} case "azure:streamanalytics/outputPowerbi:OutputPowerbi": r = &OutputPowerbi{} case "azure:streamanalytics/outputServiceBusQueue:OutputServiceBusQueue": r = &OutputServiceBusQueue{} case "azure:streamanalytics/outputServicebusTopic:OutputServicebusTopic": r = &OutputServicebusTopic{} case "azure:streamanalytics/outputSynapse:OutputSynapse": r = &OutputSynapse{} case "azure:streamanalytics/outputTable:OutputTable": r = &OutputTable{} case "azure:streamanalytics/referenceInputBlob:ReferenceInputBlob": r = &ReferenceInputBlob{} case "azure:streamanalytics/referenceInputMssql:ReferenceInputMssql": r = &ReferenceInputMssql{} case "azure:streamanalytics/streamInputBlob:StreamInputBlob": r = &StreamInputBlob{} case "azure:streamanalytics/streamInputEventHub:StreamInputEventHub": r = &StreamInputEventHub{} case "azure:streamanalytics/streamInputEventHubV2:StreamInputEventHubV2": r = &StreamInputEventHubV2{} case "azure:streamanalytics/streamInputIotHub:StreamInputIotHub": r = &StreamInputIotHub{} 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", "streamanalytics/cluster", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/functionJavaScriptUDF", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/functionJavascriptUda", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/job", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/jobSchedule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/jobStorageAccount", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/managedPrivateEndpoint", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/outputBlob", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/outputCosmosdb", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/outputEventHub", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/outputFunction", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/outputMssql", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/outputPowerbi", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/outputServiceBusQueue", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/outputServicebusTopic", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/outputSynapse", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/outputTable", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/referenceInputBlob", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/referenceInputMssql", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/streamInputBlob", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/streamInputEventHub", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/streamInputEventHubV2", &module{version}, ) pulumi.RegisterResourceModule( "azure", "streamanalytics/streamInputIotHub", &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/streamanalytics/pulumiTypes.go
sdk/go/azure/streamanalytics/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 streamanalytics 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 FunctionJavaScriptUDFInputType struct { // Is this input parameter a configuration parameter? Defaults to `false`. ConfigurationParameter *bool `pulumi:"configurationParameter"` // The Data Type for the Input Argument of this JavaScript Function. Possible values include `array`, `any`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. Type string `pulumi:"type"` } // FunctionJavaScriptUDFInputTypeInput is an input type that accepts FunctionJavaScriptUDFInputTypeArgs and FunctionJavaScriptUDFInputTypeOutput values. // You can construct a concrete instance of `FunctionJavaScriptUDFInputTypeInput` via: // // FunctionJavaScriptUDFInputTypeArgs{...} type FunctionJavaScriptUDFInputTypeInput interface { pulumi.Input ToFunctionJavaScriptUDFInputTypeOutput() FunctionJavaScriptUDFInputTypeOutput ToFunctionJavaScriptUDFInputTypeOutputWithContext(context.Context) FunctionJavaScriptUDFInputTypeOutput } type FunctionJavaScriptUDFInputTypeArgs struct { // Is this input parameter a configuration parameter? Defaults to `false`. ConfigurationParameter pulumi.BoolPtrInput `pulumi:"configurationParameter"` // The Data Type for the Input Argument of this JavaScript Function. Possible values include `array`, `any`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. Type pulumi.StringInput `pulumi:"type"` } func (FunctionJavaScriptUDFInputTypeArgs) ElementType() reflect.Type { return reflect.TypeOf((*FunctionJavaScriptUDFInputType)(nil)).Elem() } func (i FunctionJavaScriptUDFInputTypeArgs) ToFunctionJavaScriptUDFInputTypeOutput() FunctionJavaScriptUDFInputTypeOutput { return i.ToFunctionJavaScriptUDFInputTypeOutputWithContext(context.Background()) } func (i FunctionJavaScriptUDFInputTypeArgs) ToFunctionJavaScriptUDFInputTypeOutputWithContext(ctx context.Context) FunctionJavaScriptUDFInputTypeOutput { return pulumi.ToOutputWithContext(ctx, i).(FunctionJavaScriptUDFInputTypeOutput) } // FunctionJavaScriptUDFInputTypeArrayInput is an input type that accepts FunctionJavaScriptUDFInputTypeArray and FunctionJavaScriptUDFInputTypeArrayOutput values. // You can construct a concrete instance of `FunctionJavaScriptUDFInputTypeArrayInput` via: // // FunctionJavaScriptUDFInputTypeArray{ FunctionJavaScriptUDFInputTypeArgs{...} } type FunctionJavaScriptUDFInputTypeArrayInput interface { pulumi.Input ToFunctionJavaScriptUDFInputTypeArrayOutput() FunctionJavaScriptUDFInputTypeArrayOutput ToFunctionJavaScriptUDFInputTypeArrayOutputWithContext(context.Context) FunctionJavaScriptUDFInputTypeArrayOutput } type FunctionJavaScriptUDFInputTypeArray []FunctionJavaScriptUDFInputTypeInput func (FunctionJavaScriptUDFInputTypeArray) ElementType() reflect.Type { return reflect.TypeOf((*[]FunctionJavaScriptUDFInputType)(nil)).Elem() } func (i FunctionJavaScriptUDFInputTypeArray) ToFunctionJavaScriptUDFInputTypeArrayOutput() FunctionJavaScriptUDFInputTypeArrayOutput { return i.ToFunctionJavaScriptUDFInputTypeArrayOutputWithContext(context.Background()) } func (i FunctionJavaScriptUDFInputTypeArray) ToFunctionJavaScriptUDFInputTypeArrayOutputWithContext(ctx context.Context) FunctionJavaScriptUDFInputTypeArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FunctionJavaScriptUDFInputTypeArrayOutput) } type FunctionJavaScriptUDFInputTypeOutput struct{ *pulumi.OutputState } func (FunctionJavaScriptUDFInputTypeOutput) ElementType() reflect.Type { return reflect.TypeOf((*FunctionJavaScriptUDFInputType)(nil)).Elem() } func (o FunctionJavaScriptUDFInputTypeOutput) ToFunctionJavaScriptUDFInputTypeOutput() FunctionJavaScriptUDFInputTypeOutput { return o } func (o FunctionJavaScriptUDFInputTypeOutput) ToFunctionJavaScriptUDFInputTypeOutputWithContext(ctx context.Context) FunctionJavaScriptUDFInputTypeOutput { return o } // Is this input parameter a configuration parameter? Defaults to `false`. func (o FunctionJavaScriptUDFInputTypeOutput) ConfigurationParameter() pulumi.BoolPtrOutput { return o.ApplyT(func(v FunctionJavaScriptUDFInputType) *bool { return v.ConfigurationParameter }).(pulumi.BoolPtrOutput) } // The Data Type for the Input Argument of this JavaScript Function. Possible values include `array`, `any`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. func (o FunctionJavaScriptUDFInputTypeOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v FunctionJavaScriptUDFInputType) string { return v.Type }).(pulumi.StringOutput) } type FunctionJavaScriptUDFInputTypeArrayOutput struct{ *pulumi.OutputState } func (FunctionJavaScriptUDFInputTypeArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]FunctionJavaScriptUDFInputType)(nil)).Elem() } func (o FunctionJavaScriptUDFInputTypeArrayOutput) ToFunctionJavaScriptUDFInputTypeArrayOutput() FunctionJavaScriptUDFInputTypeArrayOutput { return o } func (o FunctionJavaScriptUDFInputTypeArrayOutput) ToFunctionJavaScriptUDFInputTypeArrayOutputWithContext(ctx context.Context) FunctionJavaScriptUDFInputTypeArrayOutput { return o } func (o FunctionJavaScriptUDFInputTypeArrayOutput) Index(i pulumi.IntInput) FunctionJavaScriptUDFInputTypeOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) FunctionJavaScriptUDFInputType { return vs[0].([]FunctionJavaScriptUDFInputType)[vs[1].(int)] }).(FunctionJavaScriptUDFInputTypeOutput) } type FunctionJavaScriptUDFOutputType struct { // The Data Type output from this JavaScript Function. Possible values include `array`, `any`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. Type string `pulumi:"type"` } // FunctionJavaScriptUDFOutputTypeInput is an input type that accepts FunctionJavaScriptUDFOutputTypeArgs and FunctionJavaScriptUDFOutputTypeOutput values. // You can construct a concrete instance of `FunctionJavaScriptUDFOutputTypeInput` via: // // FunctionJavaScriptUDFOutputTypeArgs{...} type FunctionJavaScriptUDFOutputTypeInput interface { pulumi.Input ToFunctionJavaScriptUDFOutputTypeOutput() FunctionJavaScriptUDFOutputTypeOutput ToFunctionJavaScriptUDFOutputTypeOutputWithContext(context.Context) FunctionJavaScriptUDFOutputTypeOutput } type FunctionJavaScriptUDFOutputTypeArgs struct { // The Data Type output from this JavaScript Function. Possible values include `array`, `any`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. Type pulumi.StringInput `pulumi:"type"` } func (FunctionJavaScriptUDFOutputTypeArgs) ElementType() reflect.Type { return reflect.TypeOf((*FunctionJavaScriptUDFOutputType)(nil)).Elem() } func (i FunctionJavaScriptUDFOutputTypeArgs) ToFunctionJavaScriptUDFOutputTypeOutput() FunctionJavaScriptUDFOutputTypeOutput { return i.ToFunctionJavaScriptUDFOutputTypeOutputWithContext(context.Background()) } func (i FunctionJavaScriptUDFOutputTypeArgs) ToFunctionJavaScriptUDFOutputTypeOutputWithContext(ctx context.Context) FunctionJavaScriptUDFOutputTypeOutput { return pulumi.ToOutputWithContext(ctx, i).(FunctionJavaScriptUDFOutputTypeOutput) } func (i FunctionJavaScriptUDFOutputTypeArgs) ToFunctionJavaScriptUDFOutputTypePtrOutput() FunctionJavaScriptUDFOutputTypePtrOutput { return i.ToFunctionJavaScriptUDFOutputTypePtrOutputWithContext(context.Background()) } func (i FunctionJavaScriptUDFOutputTypeArgs) ToFunctionJavaScriptUDFOutputTypePtrOutputWithContext(ctx context.Context) FunctionJavaScriptUDFOutputTypePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FunctionJavaScriptUDFOutputTypeOutput).ToFunctionJavaScriptUDFOutputTypePtrOutputWithContext(ctx) } // FunctionJavaScriptUDFOutputTypePtrInput is an input type that accepts FunctionJavaScriptUDFOutputTypeArgs, FunctionJavaScriptUDFOutputTypePtr and FunctionJavaScriptUDFOutputTypePtrOutput values. // You can construct a concrete instance of `FunctionJavaScriptUDFOutputTypePtrInput` via: // // FunctionJavaScriptUDFOutputTypeArgs{...} // // or: // // nil type FunctionJavaScriptUDFOutputTypePtrInput interface { pulumi.Input ToFunctionJavaScriptUDFOutputTypePtrOutput() FunctionJavaScriptUDFOutputTypePtrOutput ToFunctionJavaScriptUDFOutputTypePtrOutputWithContext(context.Context) FunctionJavaScriptUDFOutputTypePtrOutput } type functionJavaScriptUDFOutputTypePtrType FunctionJavaScriptUDFOutputTypeArgs func FunctionJavaScriptUDFOutputTypePtr(v *FunctionJavaScriptUDFOutputTypeArgs) FunctionJavaScriptUDFOutputTypePtrInput { return (*functionJavaScriptUDFOutputTypePtrType)(v) } func (*functionJavaScriptUDFOutputTypePtrType) ElementType() reflect.Type { return reflect.TypeOf((**FunctionJavaScriptUDFOutputType)(nil)).Elem() } func (i *functionJavaScriptUDFOutputTypePtrType) ToFunctionJavaScriptUDFOutputTypePtrOutput() FunctionJavaScriptUDFOutputTypePtrOutput { return i.ToFunctionJavaScriptUDFOutputTypePtrOutputWithContext(context.Background()) } func (i *functionJavaScriptUDFOutputTypePtrType) ToFunctionJavaScriptUDFOutputTypePtrOutputWithContext(ctx context.Context) FunctionJavaScriptUDFOutputTypePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FunctionJavaScriptUDFOutputTypePtrOutput) } type FunctionJavaScriptUDFOutputTypeOutput struct{ *pulumi.OutputState } func (FunctionJavaScriptUDFOutputTypeOutput) ElementType() reflect.Type { return reflect.TypeOf((*FunctionJavaScriptUDFOutputType)(nil)).Elem() } func (o FunctionJavaScriptUDFOutputTypeOutput) ToFunctionJavaScriptUDFOutputTypeOutput() FunctionJavaScriptUDFOutputTypeOutput { return o } func (o FunctionJavaScriptUDFOutputTypeOutput) ToFunctionJavaScriptUDFOutputTypeOutputWithContext(ctx context.Context) FunctionJavaScriptUDFOutputTypeOutput { return o } func (o FunctionJavaScriptUDFOutputTypeOutput) ToFunctionJavaScriptUDFOutputTypePtrOutput() FunctionJavaScriptUDFOutputTypePtrOutput { return o.ToFunctionJavaScriptUDFOutputTypePtrOutputWithContext(context.Background()) } func (o FunctionJavaScriptUDFOutputTypeOutput) ToFunctionJavaScriptUDFOutputTypePtrOutputWithContext(ctx context.Context) FunctionJavaScriptUDFOutputTypePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v FunctionJavaScriptUDFOutputType) *FunctionJavaScriptUDFOutputType { return &v }).(FunctionJavaScriptUDFOutputTypePtrOutput) } // The Data Type output from this JavaScript Function. Possible values include `array`, `any`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. func (o FunctionJavaScriptUDFOutputTypeOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v FunctionJavaScriptUDFOutputType) string { return v.Type }).(pulumi.StringOutput) } type FunctionJavaScriptUDFOutputTypePtrOutput struct{ *pulumi.OutputState } func (FunctionJavaScriptUDFOutputTypePtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**FunctionJavaScriptUDFOutputType)(nil)).Elem() } func (o FunctionJavaScriptUDFOutputTypePtrOutput) ToFunctionJavaScriptUDFOutputTypePtrOutput() FunctionJavaScriptUDFOutputTypePtrOutput { return o } func (o FunctionJavaScriptUDFOutputTypePtrOutput) ToFunctionJavaScriptUDFOutputTypePtrOutputWithContext(ctx context.Context) FunctionJavaScriptUDFOutputTypePtrOutput { return o } func (o FunctionJavaScriptUDFOutputTypePtrOutput) Elem() FunctionJavaScriptUDFOutputTypeOutput { return o.ApplyT(func(v *FunctionJavaScriptUDFOutputType) FunctionJavaScriptUDFOutputType { if v != nil { return *v } var ret FunctionJavaScriptUDFOutputType return ret }).(FunctionJavaScriptUDFOutputTypeOutput) } // The Data Type output from this JavaScript Function. Possible values include `array`, `any`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. func (o FunctionJavaScriptUDFOutputTypePtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *FunctionJavaScriptUDFOutputType) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } type FunctionJavascriptUdaInputType struct { // Is this input parameter a configuration parameter? Defaults to `false`. ConfigurationParameter *bool `pulumi:"configurationParameter"` // The input data type of this JavaScript Function. Possible values include `any`, `array`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. Type string `pulumi:"type"` } // FunctionJavascriptUdaInputTypeInput is an input type that accepts FunctionJavascriptUdaInputTypeArgs and FunctionJavascriptUdaInputTypeOutput values. // You can construct a concrete instance of `FunctionJavascriptUdaInputTypeInput` via: // // FunctionJavascriptUdaInputTypeArgs{...} type FunctionJavascriptUdaInputTypeInput interface { pulumi.Input ToFunctionJavascriptUdaInputTypeOutput() FunctionJavascriptUdaInputTypeOutput ToFunctionJavascriptUdaInputTypeOutputWithContext(context.Context) FunctionJavascriptUdaInputTypeOutput } type FunctionJavascriptUdaInputTypeArgs struct { // Is this input parameter a configuration parameter? Defaults to `false`. ConfigurationParameter pulumi.BoolPtrInput `pulumi:"configurationParameter"` // The input data type of this JavaScript Function. Possible values include `any`, `array`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. Type pulumi.StringInput `pulumi:"type"` } func (FunctionJavascriptUdaInputTypeArgs) ElementType() reflect.Type { return reflect.TypeOf((*FunctionJavascriptUdaInputType)(nil)).Elem() } func (i FunctionJavascriptUdaInputTypeArgs) ToFunctionJavascriptUdaInputTypeOutput() FunctionJavascriptUdaInputTypeOutput { return i.ToFunctionJavascriptUdaInputTypeOutputWithContext(context.Background()) } func (i FunctionJavascriptUdaInputTypeArgs) ToFunctionJavascriptUdaInputTypeOutputWithContext(ctx context.Context) FunctionJavascriptUdaInputTypeOutput { return pulumi.ToOutputWithContext(ctx, i).(FunctionJavascriptUdaInputTypeOutput) } // FunctionJavascriptUdaInputTypeArrayInput is an input type that accepts FunctionJavascriptUdaInputTypeArray and FunctionJavascriptUdaInputTypeArrayOutput values. // You can construct a concrete instance of `FunctionJavascriptUdaInputTypeArrayInput` via: // // FunctionJavascriptUdaInputTypeArray{ FunctionJavascriptUdaInputTypeArgs{...} } type FunctionJavascriptUdaInputTypeArrayInput interface { pulumi.Input ToFunctionJavascriptUdaInputTypeArrayOutput() FunctionJavascriptUdaInputTypeArrayOutput ToFunctionJavascriptUdaInputTypeArrayOutputWithContext(context.Context) FunctionJavascriptUdaInputTypeArrayOutput } type FunctionJavascriptUdaInputTypeArray []FunctionJavascriptUdaInputTypeInput func (FunctionJavascriptUdaInputTypeArray) ElementType() reflect.Type { return reflect.TypeOf((*[]FunctionJavascriptUdaInputType)(nil)).Elem() } func (i FunctionJavascriptUdaInputTypeArray) ToFunctionJavascriptUdaInputTypeArrayOutput() FunctionJavascriptUdaInputTypeArrayOutput { return i.ToFunctionJavascriptUdaInputTypeArrayOutputWithContext(context.Background()) } func (i FunctionJavascriptUdaInputTypeArray) ToFunctionJavascriptUdaInputTypeArrayOutputWithContext(ctx context.Context) FunctionJavascriptUdaInputTypeArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FunctionJavascriptUdaInputTypeArrayOutput) } type FunctionJavascriptUdaInputTypeOutput struct{ *pulumi.OutputState } func (FunctionJavascriptUdaInputTypeOutput) ElementType() reflect.Type { return reflect.TypeOf((*FunctionJavascriptUdaInputType)(nil)).Elem() } func (o FunctionJavascriptUdaInputTypeOutput) ToFunctionJavascriptUdaInputTypeOutput() FunctionJavascriptUdaInputTypeOutput { return o } func (o FunctionJavascriptUdaInputTypeOutput) ToFunctionJavascriptUdaInputTypeOutputWithContext(ctx context.Context) FunctionJavascriptUdaInputTypeOutput { return o } // Is this input parameter a configuration parameter? Defaults to `false`. func (o FunctionJavascriptUdaInputTypeOutput) ConfigurationParameter() pulumi.BoolPtrOutput { return o.ApplyT(func(v FunctionJavascriptUdaInputType) *bool { return v.ConfigurationParameter }).(pulumi.BoolPtrOutput) } // The input data type of this JavaScript Function. Possible values include `any`, `array`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. func (o FunctionJavascriptUdaInputTypeOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v FunctionJavascriptUdaInputType) string { return v.Type }).(pulumi.StringOutput) } type FunctionJavascriptUdaInputTypeArrayOutput struct{ *pulumi.OutputState } func (FunctionJavascriptUdaInputTypeArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]FunctionJavascriptUdaInputType)(nil)).Elem() } func (o FunctionJavascriptUdaInputTypeArrayOutput) ToFunctionJavascriptUdaInputTypeArrayOutput() FunctionJavascriptUdaInputTypeArrayOutput { return o } func (o FunctionJavascriptUdaInputTypeArrayOutput) ToFunctionJavascriptUdaInputTypeArrayOutputWithContext(ctx context.Context) FunctionJavascriptUdaInputTypeArrayOutput { return o } func (o FunctionJavascriptUdaInputTypeArrayOutput) Index(i pulumi.IntInput) FunctionJavascriptUdaInputTypeOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) FunctionJavascriptUdaInputType { return vs[0].([]FunctionJavascriptUdaInputType)[vs[1].(int)] }).(FunctionJavascriptUdaInputTypeOutput) } type FunctionJavascriptUdaOutputType struct { // The output data type from this JavaScript Function. Possible values include `any`, `array`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. Type string `pulumi:"type"` } // FunctionJavascriptUdaOutputTypeInput is an input type that accepts FunctionJavascriptUdaOutputTypeArgs and FunctionJavascriptUdaOutputTypeOutput values. // You can construct a concrete instance of `FunctionJavascriptUdaOutputTypeInput` via: // // FunctionJavascriptUdaOutputTypeArgs{...} type FunctionJavascriptUdaOutputTypeInput interface { pulumi.Input ToFunctionJavascriptUdaOutputTypeOutput() FunctionJavascriptUdaOutputTypeOutput ToFunctionJavascriptUdaOutputTypeOutputWithContext(context.Context) FunctionJavascriptUdaOutputTypeOutput } type FunctionJavascriptUdaOutputTypeArgs struct { // The output data type from this JavaScript Function. Possible values include `any`, `array`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. Type pulumi.StringInput `pulumi:"type"` } func (FunctionJavascriptUdaOutputTypeArgs) ElementType() reflect.Type { return reflect.TypeOf((*FunctionJavascriptUdaOutputType)(nil)).Elem() } func (i FunctionJavascriptUdaOutputTypeArgs) ToFunctionJavascriptUdaOutputTypeOutput() FunctionJavascriptUdaOutputTypeOutput { return i.ToFunctionJavascriptUdaOutputTypeOutputWithContext(context.Background()) } func (i FunctionJavascriptUdaOutputTypeArgs) ToFunctionJavascriptUdaOutputTypeOutputWithContext(ctx context.Context) FunctionJavascriptUdaOutputTypeOutput { return pulumi.ToOutputWithContext(ctx, i).(FunctionJavascriptUdaOutputTypeOutput) } func (i FunctionJavascriptUdaOutputTypeArgs) ToFunctionJavascriptUdaOutputTypePtrOutput() FunctionJavascriptUdaOutputTypePtrOutput { return i.ToFunctionJavascriptUdaOutputTypePtrOutputWithContext(context.Background()) } func (i FunctionJavascriptUdaOutputTypeArgs) ToFunctionJavascriptUdaOutputTypePtrOutputWithContext(ctx context.Context) FunctionJavascriptUdaOutputTypePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FunctionJavascriptUdaOutputTypeOutput).ToFunctionJavascriptUdaOutputTypePtrOutputWithContext(ctx) } // FunctionJavascriptUdaOutputTypePtrInput is an input type that accepts FunctionJavascriptUdaOutputTypeArgs, FunctionJavascriptUdaOutputTypePtr and FunctionJavascriptUdaOutputTypePtrOutput values. // You can construct a concrete instance of `FunctionJavascriptUdaOutputTypePtrInput` via: // // FunctionJavascriptUdaOutputTypeArgs{...} // // or: // // nil type FunctionJavascriptUdaOutputTypePtrInput interface { pulumi.Input ToFunctionJavascriptUdaOutputTypePtrOutput() FunctionJavascriptUdaOutputTypePtrOutput ToFunctionJavascriptUdaOutputTypePtrOutputWithContext(context.Context) FunctionJavascriptUdaOutputTypePtrOutput } type functionJavascriptUdaOutputTypePtrType FunctionJavascriptUdaOutputTypeArgs func FunctionJavascriptUdaOutputTypePtr(v *FunctionJavascriptUdaOutputTypeArgs) FunctionJavascriptUdaOutputTypePtrInput { return (*functionJavascriptUdaOutputTypePtrType)(v) } func (*functionJavascriptUdaOutputTypePtrType) ElementType() reflect.Type { return reflect.TypeOf((**FunctionJavascriptUdaOutputType)(nil)).Elem() } func (i *functionJavascriptUdaOutputTypePtrType) ToFunctionJavascriptUdaOutputTypePtrOutput() FunctionJavascriptUdaOutputTypePtrOutput { return i.ToFunctionJavascriptUdaOutputTypePtrOutputWithContext(context.Background()) } func (i *functionJavascriptUdaOutputTypePtrType) ToFunctionJavascriptUdaOutputTypePtrOutputWithContext(ctx context.Context) FunctionJavascriptUdaOutputTypePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FunctionJavascriptUdaOutputTypePtrOutput) } type FunctionJavascriptUdaOutputTypeOutput struct{ *pulumi.OutputState } func (FunctionJavascriptUdaOutputTypeOutput) ElementType() reflect.Type { return reflect.TypeOf((*FunctionJavascriptUdaOutputType)(nil)).Elem() } func (o FunctionJavascriptUdaOutputTypeOutput) ToFunctionJavascriptUdaOutputTypeOutput() FunctionJavascriptUdaOutputTypeOutput { return o } func (o FunctionJavascriptUdaOutputTypeOutput) ToFunctionJavascriptUdaOutputTypeOutputWithContext(ctx context.Context) FunctionJavascriptUdaOutputTypeOutput { return o } func (o FunctionJavascriptUdaOutputTypeOutput) ToFunctionJavascriptUdaOutputTypePtrOutput() FunctionJavascriptUdaOutputTypePtrOutput { return o.ToFunctionJavascriptUdaOutputTypePtrOutputWithContext(context.Background()) } func (o FunctionJavascriptUdaOutputTypeOutput) ToFunctionJavascriptUdaOutputTypePtrOutputWithContext(ctx context.Context) FunctionJavascriptUdaOutputTypePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v FunctionJavascriptUdaOutputType) *FunctionJavascriptUdaOutputType { return &v }).(FunctionJavascriptUdaOutputTypePtrOutput) } // The output data type from this JavaScript Function. Possible values include `any`, `array`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. func (o FunctionJavascriptUdaOutputTypeOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v FunctionJavascriptUdaOutputType) string { return v.Type }).(pulumi.StringOutput) } type FunctionJavascriptUdaOutputTypePtrOutput struct{ *pulumi.OutputState } func (FunctionJavascriptUdaOutputTypePtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**FunctionJavascriptUdaOutputType)(nil)).Elem() } func (o FunctionJavascriptUdaOutputTypePtrOutput) ToFunctionJavascriptUdaOutputTypePtrOutput() FunctionJavascriptUdaOutputTypePtrOutput { return o } func (o FunctionJavascriptUdaOutputTypePtrOutput) ToFunctionJavascriptUdaOutputTypePtrOutputWithContext(ctx context.Context) FunctionJavascriptUdaOutputTypePtrOutput { return o } func (o FunctionJavascriptUdaOutputTypePtrOutput) Elem() FunctionJavascriptUdaOutputTypeOutput { return o.ApplyT(func(v *FunctionJavascriptUdaOutputType) FunctionJavascriptUdaOutputType { if v != nil { return *v } var ret FunctionJavascriptUdaOutputType return ret }).(FunctionJavascriptUdaOutputTypeOutput) } // The output data type from this JavaScript Function. Possible values include `any`, `array`, `bigint`, `datetime`, `float`, `nvarchar(max)` and `record`. func (o FunctionJavascriptUdaOutputTypePtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *FunctionJavascriptUdaOutputType) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } type JobIdentity struct { // The identity id of the user assigned identity to use when type is `UserAssigned` IdentityIds []string `pulumi:"identityIds"` // The Principal ID associated with this Managed Service Identity. PrincipalId *string `pulumi:"principalId"` // The Tenant ID associated with this Managed Service Identity. TenantId *string `pulumi:"tenantId"` // Specifies the type of Managed Service Identity that should be configured on this Stream Analytics Job. Possible values are `SystemAssigned` and `UserAssigned`. Type string `pulumi:"type"` } // JobIdentityInput is an input type that accepts JobIdentityArgs and JobIdentityOutput values. // You can construct a concrete instance of `JobIdentityInput` via: // // JobIdentityArgs{...} type JobIdentityInput interface { pulumi.Input ToJobIdentityOutput() JobIdentityOutput ToJobIdentityOutputWithContext(context.Context) JobIdentityOutput } type JobIdentityArgs struct { // The identity id of the user assigned identity to use when type is `UserAssigned` IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"` // The Principal ID associated with this Managed Service Identity. PrincipalId pulumi.StringPtrInput `pulumi:"principalId"` // The Tenant ID associated with this Managed Service Identity. TenantId pulumi.StringPtrInput `pulumi:"tenantId"` // Specifies the type of Managed Service Identity that should be configured on this Stream Analytics Job. Possible values are `SystemAssigned` and `UserAssigned`. Type pulumi.StringInput `pulumi:"type"` } func (JobIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*JobIdentity)(nil)).Elem() } func (i JobIdentityArgs) ToJobIdentityOutput() JobIdentityOutput { return i.ToJobIdentityOutputWithContext(context.Background()) } func (i JobIdentityArgs) ToJobIdentityOutputWithContext(ctx context.Context) JobIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(JobIdentityOutput) } func (i JobIdentityArgs) ToJobIdentityPtrOutput() JobIdentityPtrOutput { return i.ToJobIdentityPtrOutputWithContext(context.Background()) } func (i JobIdentityArgs) ToJobIdentityPtrOutputWithContext(ctx context.Context) JobIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(JobIdentityOutput).ToJobIdentityPtrOutputWithContext(ctx) } // JobIdentityPtrInput is an input type that accepts JobIdentityArgs, JobIdentityPtr and JobIdentityPtrOutput values. // You can construct a concrete instance of `JobIdentityPtrInput` via: // // JobIdentityArgs{...} // // or: // // nil type JobIdentityPtrInput interface { pulumi.Input ToJobIdentityPtrOutput() JobIdentityPtrOutput ToJobIdentityPtrOutputWithContext(context.Context) JobIdentityPtrOutput } type jobIdentityPtrType JobIdentityArgs func JobIdentityPtr(v *JobIdentityArgs) JobIdentityPtrInput { return (*jobIdentityPtrType)(v) } func (*jobIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**JobIdentity)(nil)).Elem() } func (i *jobIdentityPtrType) ToJobIdentityPtrOutput() JobIdentityPtrOutput { return i.ToJobIdentityPtrOutputWithContext(context.Background()) } func (i *jobIdentityPtrType) ToJobIdentityPtrOutputWithContext(ctx context.Context) JobIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(JobIdentityPtrOutput) } type JobIdentityOutput struct{ *pulumi.OutputState } func (JobIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*JobIdentity)(nil)).Elem() } func (o JobIdentityOutput) ToJobIdentityOutput() JobIdentityOutput { return o } func (o JobIdentityOutput) ToJobIdentityOutputWithContext(ctx context.Context) JobIdentityOutput { return o } func (o JobIdentityOutput) ToJobIdentityPtrOutput() JobIdentityPtrOutput { return o.ToJobIdentityPtrOutputWithContext(context.Background()) } func (o JobIdentityOutput) ToJobIdentityPtrOutputWithContext(ctx context.Context) JobIdentityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v JobIdentity) *JobIdentity { return &v }).(JobIdentityPtrOutput) } // The identity id of the user assigned identity to use when type is `UserAssigned` func (o JobIdentityOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v JobIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID associated with this Managed Service Identity. func (o JobIdentityOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v JobIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID associated with this Managed Service Identity. func (o JobIdentityOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v JobIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Service Identity that should be configured on this Stream Analytics Job. Possible values are `SystemAssigned` and `UserAssigned`. func (o JobIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v JobIdentity) string { return v.Type }).(pulumi.StringOutput) } type JobIdentityPtrOutput struct{ *pulumi.OutputState } func (JobIdentityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**JobIdentity)(nil)).Elem() } func (o JobIdentityPtrOutput) ToJobIdentityPtrOutput() JobIdentityPtrOutput { return o } func (o JobIdentityPtrOutput) ToJobIdentityPtrOutputWithContext(ctx context.Context) JobIdentityPtrOutput { return o } func (o JobIdentityPtrOutput) Elem() JobIdentityOutput { return o.ApplyT(func(v *JobIdentity) JobIdentity { if v != nil { return *v } var ret JobIdentity return ret }).(JobIdentityOutput) } // The identity id of the user assigned identity to use when type is `UserAssigned` func (o JobIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *JobIdentity) []string { if v == nil { return nil } return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID associated with this Managed Service Identity. func (o JobIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v *JobIdentity) *string { if v == nil { return nil } return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID associated with this Managed Service Identity. func (o JobIdentityPtrOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v *JobIdentity) *string { if v == nil { return nil } return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Service Identity that should be configured on this Stream Analytics Job. Possible values are `SystemAssigned` and `UserAssigned`. func (o JobIdentityPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *JobIdentity) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } type JobJobStorageAccount struct { // The account key for the Azure storage account. AccountKey *string `pulumi:"accountKey"` // The name of the Azure storage account. AccountName string `pulumi:"accountName"` // The authentication mode of the storage account. Possible values are `ConnectionString` and `Msi`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` } // JobJobStorageAccountInput is an input type that accepts JobJobStorageAccountArgs and JobJobStorageAccountOutput values. // You can construct a concrete instance of `JobJobStorageAccountInput` via: // // JobJobStorageAccountArgs{...} type JobJobStorageAccountInput interface { pulumi.Input ToJobJobStorageAccountOutput() JobJobStorageAccountOutput ToJobJobStorageAccountOutputWithContext(context.Context) JobJobStorageAccountOutput } type JobJobStorageAccountArgs struct { // The account key for the Azure storage account. AccountKey pulumi.StringPtrInput `pulumi:"accountKey"` // The name of the Azure storage account. AccountName pulumi.StringInput `pulumi:"accountName"` // The authentication mode of the storage account. Possible values are `ConnectionString` and `Msi`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput `pulumi:"authenticationMode"` } func (JobJobStorageAccountArgs) ElementType() reflect.Type { return reflect.TypeOf((*JobJobStorageAccount)(nil)).Elem() } func (i JobJobStorageAccountArgs) ToJobJobStorageAccountOutput() JobJobStorageAccountOutput { return i.ToJobJobStorageAccountOutputWithContext(context.Background()) } func (i JobJobStorageAccountArgs) ToJobJobStorageAccountOutputWithContext(ctx context.Context) JobJobStorageAccountOutput { return pulumi.ToOutputWithContext(ctx, i).(JobJobStorageAccountOutput) } // JobJobStorageAccountArrayInput is an input type that accepts JobJobStorageAccountArray and JobJobStorageAccountArrayOutput values. // You can construct a concrete instance of `JobJobStorageAccountArrayInput` via: // // JobJobStorageAccountArray{ JobJobStorageAccountArgs{...} } type JobJobStorageAccountArrayInput interface { pulumi.Input
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/streamanalytics/job.go
sdk/go/azure/streamanalytics/job.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Job. // // ## 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/streamanalytics" // "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 = streamanalytics.NewJob(ctx, "example", &streamanalytics.JobArgs{ // Name: pulumi.String("example-job"), // ResourceGroupName: example.Name, // Location: example.Location, // CompatibilityLevel: pulumi.String("1.2"), // DataLocale: pulumi.String("en-GB"), // EventsLateArrivalMaxDelayInSeconds: pulumi.Int(60), // EventsOutOfOrderMaxDelayInSeconds: pulumi.Int(50), // EventsOutOfOrderPolicy: pulumi.String("Adjust"), // OutputErrorPolicy: pulumi.String("Drop"), // StreamingUnits: pulumi.Int(3), // SkuName: pulumi.String("StandardV2"), // Tags: pulumi.StringMap{ // "environment": pulumi.String("Example"), // }, // TransformationQuery: pulumi.String(" SELECT *\n INTO [YourOutputAlias]\n FROM [YourInputAlias]\n"), // }) // 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.StreamAnalytics` - 2021-10-01-preview, 2020-03-01 // // ## Import // // Stream Analytics Job's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/job:Job example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1 // ``` type Job struct { pulumi.CustomResourceState // Specifies the compatibility level for this job - which controls certain runtime behaviours of the streaming job. Possible values are `1.0`, `1.1` and `1.2`. // // > **Note:** Support for Compatibility Level 1.2 is dependent on a new version of the Stream Analytics API, which [being tracked in this issue](https://github.com/Azure/azure-rest-api-specs/issues/5604). CompatibilityLevel pulumi.StringOutput `pulumi:"compatibilityLevel"` // The policy for storing stream analytics content. Possible values are `JobStorageAccount`, `SystemAccount`. Defaults to `SystemAccount`. ContentStoragePolicy pulumi.StringPtrOutput `pulumi:"contentStoragePolicy"` // Specifies the Data Locale of the Job, which [should be a supported .NET Culture](<https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx>). Defaults to `en-US`. DataLocale pulumi.StringPtrOutput `pulumi:"dataLocale"` // Specifies the maximum tolerable delay in seconds where events arriving late could be included. Supported range is `-1` (indefinite) to `1814399` (20d 23h 59m 59s). Default is `5`. EventsLateArrivalMaxDelayInSeconds pulumi.IntPtrOutput `pulumi:"eventsLateArrivalMaxDelayInSeconds"` // Specifies the maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. Supported range is `0` to `599` (9m 59s). Default is `0`. EventsOutOfOrderMaxDelayInSeconds pulumi.IntPtrOutput `pulumi:"eventsOutOfOrderMaxDelayInSeconds"` // Specifies the policy which should be applied to events which arrive out of order in the input event stream. Possible values are `Adjust` and `Drop`. Default is `Adjust`. EventsOutOfOrderPolicy pulumi.StringPtrOutput `pulumi:"eventsOutOfOrderPolicy"` // An `identity` block as defined below. Identity JobIdentityPtrOutput `pulumi:"identity"` // The Job ID assigned by the Stream Analytics Job. JobId pulumi.StringOutput `pulumi:"jobId"` // The details of the job storage account. A `jobStorageAccount` block as defined below. // // > **Note:** `contentStoragePolicy` must be set to `JobStorageAccount` when specifying `jobStorageAccount`. JobStorageAccounts JobJobStorageAccountArrayOutput `pulumi:"jobStorageAccounts"` // The Azure Region in which the Resource Group exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the policy which should be applied to events which arrive at the output and cannot be written to the external storage due to being malformed (such as missing column values, column values of wrong type or size). Possible values are `Drop` and `Stop`. Default is `Drop`. OutputErrorPolicy pulumi.StringPtrOutput `pulumi:"outputErrorPolicy"` // The name of the Resource Group where the Stream Analytics Job should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The SKU Name to use for the Stream Analytics Job. Possible values are `Standard`, `StandardV2`. Defaults to `Standard`. SkuName pulumi.StringPtrOutput `pulumi:"skuName"` // The ID of an existing Stream Analytics Cluster where the Stream Analytics Job should run. StreamAnalyticsClusterId pulumi.StringPtrOutput `pulumi:"streamAnalyticsClusterId"` // Specifies the number of streaming units that the streaming job uses. Supported values are `1`, `3`, `6` and multiples of `6` up to `120`. A conversion table for V2 streaming units can be found [here](https://learn.microsoft.com/azure/stream-analytics/stream-analytics-streaming-unit-consumption#understand-streaming-unit-conversions-and-where-they-apply) // // > **Note:** `streamingUnits` must be set when `type` is `Cloud`. StreamingUnits pulumi.IntPtrOutput `pulumi:"streamingUnits"` Tags pulumi.StringMapOutput `pulumi:"tags"` TransformationQuery pulumi.StringOutput `pulumi:"transformationQuery"` // The type of the Stream Analytics Job. Possible values are `Cloud` and `Edge`. Defaults to `Cloud`. Changing this forces a new resource to be created. // // > **Note:** `Edge` doesn't support `streamAnalyticsClusterId` and `streamingUnits`. Type pulumi.StringPtrOutput `pulumi:"type"` } // NewJob registers a new resource with the given unique name, arguments, and options. func NewJob(ctx *pulumi.Context, name string, args *JobArgs, opts ...pulumi.ResourceOption) (*Job, 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.TransformationQuery == nil { return nil, errors.New("invalid value for required argument 'TransformationQuery'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Job err := ctx.RegisterResource("azure:streamanalytics/job:Job", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetJob gets an existing Job 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 GetJob(ctx *pulumi.Context, name string, id pulumi.IDInput, state *JobState, opts ...pulumi.ResourceOption) (*Job, error) { var resource Job err := ctx.ReadResource("azure:streamanalytics/job:Job", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Job resources. type jobState struct { // Specifies the compatibility level for this job - which controls certain runtime behaviours of the streaming job. Possible values are `1.0`, `1.1` and `1.2`. // // > **Note:** Support for Compatibility Level 1.2 is dependent on a new version of the Stream Analytics API, which [being tracked in this issue](https://github.com/Azure/azure-rest-api-specs/issues/5604). CompatibilityLevel *string `pulumi:"compatibilityLevel"` // The policy for storing stream analytics content. Possible values are `JobStorageAccount`, `SystemAccount`. Defaults to `SystemAccount`. ContentStoragePolicy *string `pulumi:"contentStoragePolicy"` // Specifies the Data Locale of the Job, which [should be a supported .NET Culture](<https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx>). Defaults to `en-US`. DataLocale *string `pulumi:"dataLocale"` // Specifies the maximum tolerable delay in seconds where events arriving late could be included. Supported range is `-1` (indefinite) to `1814399` (20d 23h 59m 59s). Default is `5`. EventsLateArrivalMaxDelayInSeconds *int `pulumi:"eventsLateArrivalMaxDelayInSeconds"` // Specifies the maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. Supported range is `0` to `599` (9m 59s). Default is `0`. EventsOutOfOrderMaxDelayInSeconds *int `pulumi:"eventsOutOfOrderMaxDelayInSeconds"` // Specifies the policy which should be applied to events which arrive out of order in the input event stream. Possible values are `Adjust` and `Drop`. Default is `Adjust`. EventsOutOfOrderPolicy *string `pulumi:"eventsOutOfOrderPolicy"` // An `identity` block as defined below. Identity *JobIdentity `pulumi:"identity"` // The Job ID assigned by the Stream Analytics Job. JobId *string `pulumi:"jobId"` // The details of the job storage account. A `jobStorageAccount` block as defined below. // // > **Note:** `contentStoragePolicy` must be set to `JobStorageAccount` when specifying `jobStorageAccount`. JobStorageAccounts []JobJobStorageAccount `pulumi:"jobStorageAccounts"` // The Azure Region in which the Resource Group exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the policy which should be applied to events which arrive at the output and cannot be written to the external storage due to being malformed (such as missing column values, column values of wrong type or size). Possible values are `Drop` and `Stop`. Default is `Drop`. OutputErrorPolicy *string `pulumi:"outputErrorPolicy"` // The name of the Resource Group where the Stream Analytics Job should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The SKU Name to use for the Stream Analytics Job. Possible values are `Standard`, `StandardV2`. Defaults to `Standard`. SkuName *string `pulumi:"skuName"` // The ID of an existing Stream Analytics Cluster where the Stream Analytics Job should run. StreamAnalyticsClusterId *string `pulumi:"streamAnalyticsClusterId"` // Specifies the number of streaming units that the streaming job uses. Supported values are `1`, `3`, `6` and multiples of `6` up to `120`. A conversion table for V2 streaming units can be found [here](https://learn.microsoft.com/azure/stream-analytics/stream-analytics-streaming-unit-consumption#understand-streaming-unit-conversions-and-where-they-apply) // // > **Note:** `streamingUnits` must be set when `type` is `Cloud`. StreamingUnits *int `pulumi:"streamingUnits"` Tags map[string]string `pulumi:"tags"` TransformationQuery *string `pulumi:"transformationQuery"` // The type of the Stream Analytics Job. Possible values are `Cloud` and `Edge`. Defaults to `Cloud`. Changing this forces a new resource to be created. // // > **Note:** `Edge` doesn't support `streamAnalyticsClusterId` and `streamingUnits`. Type *string `pulumi:"type"` } type JobState struct { // Specifies the compatibility level for this job - which controls certain runtime behaviours of the streaming job. Possible values are `1.0`, `1.1` and `1.2`. // // > **Note:** Support for Compatibility Level 1.2 is dependent on a new version of the Stream Analytics API, which [being tracked in this issue](https://github.com/Azure/azure-rest-api-specs/issues/5604). CompatibilityLevel pulumi.StringPtrInput // The policy for storing stream analytics content. Possible values are `JobStorageAccount`, `SystemAccount`. Defaults to `SystemAccount`. ContentStoragePolicy pulumi.StringPtrInput // Specifies the Data Locale of the Job, which [should be a supported .NET Culture](<https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx>). Defaults to `en-US`. DataLocale pulumi.StringPtrInput // Specifies the maximum tolerable delay in seconds where events arriving late could be included. Supported range is `-1` (indefinite) to `1814399` (20d 23h 59m 59s). Default is `5`. EventsLateArrivalMaxDelayInSeconds pulumi.IntPtrInput // Specifies the maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. Supported range is `0` to `599` (9m 59s). Default is `0`. EventsOutOfOrderMaxDelayInSeconds pulumi.IntPtrInput // Specifies the policy which should be applied to events which arrive out of order in the input event stream. Possible values are `Adjust` and `Drop`. Default is `Adjust`. EventsOutOfOrderPolicy pulumi.StringPtrInput // An `identity` block as defined below. Identity JobIdentityPtrInput // The Job ID assigned by the Stream Analytics Job. JobId pulumi.StringPtrInput // The details of the job storage account. A `jobStorageAccount` block as defined below. // // > **Note:** `contentStoragePolicy` must be set to `JobStorageAccount` when specifying `jobStorageAccount`. JobStorageAccounts JobJobStorageAccountArrayInput // The Azure Region in which the Resource Group exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the policy which should be applied to events which arrive at the output and cannot be written to the external storage due to being malformed (such as missing column values, column values of wrong type or size). Possible values are `Drop` and `Stop`. Default is `Drop`. OutputErrorPolicy pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Job should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The SKU Name to use for the Stream Analytics Job. Possible values are `Standard`, `StandardV2`. Defaults to `Standard`. SkuName pulumi.StringPtrInput // The ID of an existing Stream Analytics Cluster where the Stream Analytics Job should run. StreamAnalyticsClusterId pulumi.StringPtrInput // Specifies the number of streaming units that the streaming job uses. Supported values are `1`, `3`, `6` and multiples of `6` up to `120`. A conversion table for V2 streaming units can be found [here](https://learn.microsoft.com/azure/stream-analytics/stream-analytics-streaming-unit-consumption#understand-streaming-unit-conversions-and-where-they-apply) // // > **Note:** `streamingUnits` must be set when `type` is `Cloud`. StreamingUnits pulumi.IntPtrInput Tags pulumi.StringMapInput TransformationQuery pulumi.StringPtrInput // The type of the Stream Analytics Job. Possible values are `Cloud` and `Edge`. Defaults to `Cloud`. Changing this forces a new resource to be created. // // > **Note:** `Edge` doesn't support `streamAnalyticsClusterId` and `streamingUnits`. Type pulumi.StringPtrInput } func (JobState) ElementType() reflect.Type { return reflect.TypeOf((*jobState)(nil)).Elem() } type jobArgs struct { // Specifies the compatibility level for this job - which controls certain runtime behaviours of the streaming job. Possible values are `1.0`, `1.1` and `1.2`. // // > **Note:** Support for Compatibility Level 1.2 is dependent on a new version of the Stream Analytics API, which [being tracked in this issue](https://github.com/Azure/azure-rest-api-specs/issues/5604). CompatibilityLevel *string `pulumi:"compatibilityLevel"` // The policy for storing stream analytics content. Possible values are `JobStorageAccount`, `SystemAccount`. Defaults to `SystemAccount`. ContentStoragePolicy *string `pulumi:"contentStoragePolicy"` // Specifies the Data Locale of the Job, which [should be a supported .NET Culture](<https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx>). Defaults to `en-US`. DataLocale *string `pulumi:"dataLocale"` // Specifies the maximum tolerable delay in seconds where events arriving late could be included. Supported range is `-1` (indefinite) to `1814399` (20d 23h 59m 59s). Default is `5`. EventsLateArrivalMaxDelayInSeconds *int `pulumi:"eventsLateArrivalMaxDelayInSeconds"` // Specifies the maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. Supported range is `0` to `599` (9m 59s). Default is `0`. EventsOutOfOrderMaxDelayInSeconds *int `pulumi:"eventsOutOfOrderMaxDelayInSeconds"` // Specifies the policy which should be applied to events which arrive out of order in the input event stream. Possible values are `Adjust` and `Drop`. Default is `Adjust`. EventsOutOfOrderPolicy *string `pulumi:"eventsOutOfOrderPolicy"` // An `identity` block as defined below. Identity *JobIdentity `pulumi:"identity"` // The details of the job storage account. A `jobStorageAccount` block as defined below. // // > **Note:** `contentStoragePolicy` must be set to `JobStorageAccount` when specifying `jobStorageAccount`. JobStorageAccounts []JobJobStorageAccount `pulumi:"jobStorageAccounts"` // The Azure Region in which the Resource Group exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the policy which should be applied to events which arrive at the output and cannot be written to the external storage due to being malformed (such as missing column values, column values of wrong type or size). Possible values are `Drop` and `Stop`. Default is `Drop`. OutputErrorPolicy *string `pulumi:"outputErrorPolicy"` // The name of the Resource Group where the Stream Analytics Job should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The SKU Name to use for the Stream Analytics Job. Possible values are `Standard`, `StandardV2`. Defaults to `Standard`. SkuName *string `pulumi:"skuName"` // The ID of an existing Stream Analytics Cluster where the Stream Analytics Job should run. StreamAnalyticsClusterId *string `pulumi:"streamAnalyticsClusterId"` // Specifies the number of streaming units that the streaming job uses. Supported values are `1`, `3`, `6` and multiples of `6` up to `120`. A conversion table for V2 streaming units can be found [here](https://learn.microsoft.com/azure/stream-analytics/stream-analytics-streaming-unit-consumption#understand-streaming-unit-conversions-and-where-they-apply) // // > **Note:** `streamingUnits` must be set when `type` is `Cloud`. StreamingUnits *int `pulumi:"streamingUnits"` Tags map[string]string `pulumi:"tags"` TransformationQuery string `pulumi:"transformationQuery"` // The type of the Stream Analytics Job. Possible values are `Cloud` and `Edge`. Defaults to `Cloud`. Changing this forces a new resource to be created. // // > **Note:** `Edge` doesn't support `streamAnalyticsClusterId` and `streamingUnits`. Type *string `pulumi:"type"` } // The set of arguments for constructing a Job resource. type JobArgs struct { // Specifies the compatibility level for this job - which controls certain runtime behaviours of the streaming job. Possible values are `1.0`, `1.1` and `1.2`. // // > **Note:** Support for Compatibility Level 1.2 is dependent on a new version of the Stream Analytics API, which [being tracked in this issue](https://github.com/Azure/azure-rest-api-specs/issues/5604). CompatibilityLevel pulumi.StringPtrInput // The policy for storing stream analytics content. Possible values are `JobStorageAccount`, `SystemAccount`. Defaults to `SystemAccount`. ContentStoragePolicy pulumi.StringPtrInput // Specifies the Data Locale of the Job, which [should be a supported .NET Culture](<https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx>). Defaults to `en-US`. DataLocale pulumi.StringPtrInput // Specifies the maximum tolerable delay in seconds where events arriving late could be included. Supported range is `-1` (indefinite) to `1814399` (20d 23h 59m 59s). Default is `5`. EventsLateArrivalMaxDelayInSeconds pulumi.IntPtrInput // Specifies the maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. Supported range is `0` to `599` (9m 59s). Default is `0`. EventsOutOfOrderMaxDelayInSeconds pulumi.IntPtrInput // Specifies the policy which should be applied to events which arrive out of order in the input event stream. Possible values are `Adjust` and `Drop`. Default is `Adjust`. EventsOutOfOrderPolicy pulumi.StringPtrInput // An `identity` block as defined below. Identity JobIdentityPtrInput // The details of the job storage account. A `jobStorageAccount` block as defined below. // // > **Note:** `contentStoragePolicy` must be set to `JobStorageAccount` when specifying `jobStorageAccount`. JobStorageAccounts JobJobStorageAccountArrayInput // The Azure Region in which the Resource Group exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the policy which should be applied to events which arrive at the output and cannot be written to the external storage due to being malformed (such as missing column values, column values of wrong type or size). Possible values are `Drop` and `Stop`. Default is `Drop`. OutputErrorPolicy pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Job should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The SKU Name to use for the Stream Analytics Job. Possible values are `Standard`, `StandardV2`. Defaults to `Standard`. SkuName pulumi.StringPtrInput // The ID of an existing Stream Analytics Cluster where the Stream Analytics Job should run. StreamAnalyticsClusterId pulumi.StringPtrInput // Specifies the number of streaming units that the streaming job uses. Supported values are `1`, `3`, `6` and multiples of `6` up to `120`. A conversion table for V2 streaming units can be found [here](https://learn.microsoft.com/azure/stream-analytics/stream-analytics-streaming-unit-consumption#understand-streaming-unit-conversions-and-where-they-apply) // // > **Note:** `streamingUnits` must be set when `type` is `Cloud`. StreamingUnits pulumi.IntPtrInput Tags pulumi.StringMapInput TransformationQuery pulumi.StringInput // The type of the Stream Analytics Job. Possible values are `Cloud` and `Edge`. Defaults to `Cloud`. Changing this forces a new resource to be created. // // > **Note:** `Edge` doesn't support `streamAnalyticsClusterId` and `streamingUnits`. Type pulumi.StringPtrInput } func (JobArgs) ElementType() reflect.Type { return reflect.TypeOf((*jobArgs)(nil)).Elem() } type JobInput interface { pulumi.Input ToJobOutput() JobOutput ToJobOutputWithContext(ctx context.Context) JobOutput } func (*Job) ElementType() reflect.Type { return reflect.TypeOf((**Job)(nil)).Elem() } func (i *Job) ToJobOutput() JobOutput { return i.ToJobOutputWithContext(context.Background()) } func (i *Job) ToJobOutputWithContext(ctx context.Context) JobOutput { return pulumi.ToOutputWithContext(ctx, i).(JobOutput) } // JobArrayInput is an input type that accepts JobArray and JobArrayOutput values. // You can construct a concrete instance of `JobArrayInput` via: // // JobArray{ JobArgs{...} } type JobArrayInput interface { pulumi.Input ToJobArrayOutput() JobArrayOutput ToJobArrayOutputWithContext(context.Context) JobArrayOutput } type JobArray []JobInput func (JobArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Job)(nil)).Elem() } func (i JobArray) ToJobArrayOutput() JobArrayOutput { return i.ToJobArrayOutputWithContext(context.Background()) } func (i JobArray) ToJobArrayOutputWithContext(ctx context.Context) JobArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(JobArrayOutput) } // JobMapInput is an input type that accepts JobMap and JobMapOutput values. // You can construct a concrete instance of `JobMapInput` via: // // JobMap{ "key": JobArgs{...} } type JobMapInput interface { pulumi.Input ToJobMapOutput() JobMapOutput ToJobMapOutputWithContext(context.Context) JobMapOutput } type JobMap map[string]JobInput func (JobMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Job)(nil)).Elem() } func (i JobMap) ToJobMapOutput() JobMapOutput { return i.ToJobMapOutputWithContext(context.Background()) } func (i JobMap) ToJobMapOutputWithContext(ctx context.Context) JobMapOutput { return pulumi.ToOutputWithContext(ctx, i).(JobMapOutput) } type JobOutput struct{ *pulumi.OutputState } func (JobOutput) ElementType() reflect.Type { return reflect.TypeOf((**Job)(nil)).Elem() } func (o JobOutput) ToJobOutput() JobOutput { return o } func (o JobOutput) ToJobOutputWithContext(ctx context.Context) JobOutput { return o } // Specifies the compatibility level for this job - which controls certain runtime behaviours of the streaming job. Possible values are `1.0`, `1.1` and `1.2`. // // > **Note:** Support for Compatibility Level 1.2 is dependent on a new version of the Stream Analytics API, which [being tracked in this issue](https://github.com/Azure/azure-rest-api-specs/issues/5604). func (o JobOutput) CompatibilityLevel() pulumi.StringOutput { return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.CompatibilityLevel }).(pulumi.StringOutput) } // The policy for storing stream analytics content. Possible values are `JobStorageAccount`, `SystemAccount`. Defaults to `SystemAccount`. func (o JobOutput) ContentStoragePolicy() pulumi.StringPtrOutput { return o.ApplyT(func(v *Job) pulumi.StringPtrOutput { return v.ContentStoragePolicy }).(pulumi.StringPtrOutput) } // Specifies the Data Locale of the Job, which [should be a supported .NET Culture](<https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx>). Defaults to `en-US`. func (o JobOutput) DataLocale() pulumi.StringPtrOutput { return o.ApplyT(func(v *Job) pulumi.StringPtrOutput { return v.DataLocale }).(pulumi.StringPtrOutput) } // Specifies the maximum tolerable delay in seconds where events arriving late could be included. Supported range is `-1` (indefinite) to `1814399` (20d 23h 59m 59s). Default is `5`. func (o JobOutput) EventsLateArrivalMaxDelayInSeconds() pulumi.IntPtrOutput { return o.ApplyT(func(v *Job) pulumi.IntPtrOutput { return v.EventsLateArrivalMaxDelayInSeconds }).(pulumi.IntPtrOutput) } // Specifies the maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. Supported range is `0` to `599` (9m 59s). Default is `0`. func (o JobOutput) EventsOutOfOrderMaxDelayInSeconds() pulumi.IntPtrOutput { return o.ApplyT(func(v *Job) pulumi.IntPtrOutput { return v.EventsOutOfOrderMaxDelayInSeconds }).(pulumi.IntPtrOutput) } // Specifies the policy which should be applied to events which arrive out of order in the input event stream. Possible values are `Adjust` and `Drop`. Default is `Adjust`. func (o JobOutput) EventsOutOfOrderPolicy() pulumi.StringPtrOutput { return o.ApplyT(func(v *Job) pulumi.StringPtrOutput { return v.EventsOutOfOrderPolicy }).(pulumi.StringPtrOutput) } // An `identity` block as defined below. func (o JobOutput) Identity() JobIdentityPtrOutput { return o.ApplyT(func(v *Job) JobIdentityPtrOutput { return v.Identity }).(JobIdentityPtrOutput) } // The Job ID assigned by the Stream Analytics Job. func (o JobOutput) JobId() pulumi.StringOutput { return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.JobId }).(pulumi.StringOutput) } // The details of the job storage account. A `jobStorageAccount` block as defined below. // // > **Note:** `contentStoragePolicy` must be set to `JobStorageAccount` when specifying `jobStorageAccount`. func (o JobOutput) JobStorageAccounts() JobJobStorageAccountArrayOutput { return o.ApplyT(func(v *Job) JobJobStorageAccountArrayOutput { return v.JobStorageAccounts }).(JobJobStorageAccountArrayOutput) } // The Azure Region in which the Resource Group exists. Changing this forces a new resource to be created. func (o JobOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the Stream Analytics Job. Changing this forces a new resource to be created. func (o JobOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the policy which should be applied to events which arrive at the output and cannot be written to the external storage due to being malformed (such as missing column values, column values of wrong type or size). Possible values are `Drop` and `Stop`. Default is `Drop`. func (o JobOutput) OutputErrorPolicy() pulumi.StringPtrOutput { return o.ApplyT(func(v *Job) pulumi.StringPtrOutput { return v.OutputErrorPolicy }).(pulumi.StringPtrOutput) } // The name of the Resource Group where the Stream Analytics Job should exist. Changing this forces a new resource to be created. func (o JobOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The SKU Name to use for the Stream Analytics Job. Possible values are `Standard`, `StandardV2`. Defaults to `Standard`. func (o JobOutput) SkuName() pulumi.StringPtrOutput { return o.ApplyT(func(v *Job) pulumi.StringPtrOutput { return v.SkuName }).(pulumi.StringPtrOutput) } // The ID of an existing Stream Analytics Cluster where the Stream Analytics Job should run. func (o JobOutput) StreamAnalyticsClusterId() pulumi.StringPtrOutput { return o.ApplyT(func(v *Job) pulumi.StringPtrOutput { return v.StreamAnalyticsClusterId }).(pulumi.StringPtrOutput) } // Specifies the number of streaming units that the streaming job uses. Supported values are `1`, `3`, `6` and multiples of `6` up to `120`. A conversion table for V2 streaming units can be found [here](https://learn.microsoft.com/azure/stream-analytics/stream-analytics-streaming-unit-consumption#understand-streaming-unit-conversions-and-where-they-apply) // // > **Note:** `streamingUnits` must be set when `type` is `Cloud`. func (o JobOutput) StreamingUnits() pulumi.IntPtrOutput { return o.ApplyT(func(v *Job) pulumi.IntPtrOutput { return v.StreamingUnits }).(pulumi.IntPtrOutput) } func (o JobOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Job) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } func (o JobOutput) TransformationQuery() pulumi.StringOutput { return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.TransformationQuery }).(pulumi.StringOutput) } // The type of the Stream Analytics Job. Possible values are `Cloud` and `Edge`. Defaults to `Cloud`. Changing this forces a new resource to be created. // // > **Note:** `Edge` doesn't support `streamAnalyticsClusterId` and `streamingUnits`. func (o JobOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *Job) pulumi.StringPtrOutput { return v.Type }).(pulumi.StringPtrOutput) } type JobArrayOutput struct{ *pulumi.OutputState } func (JobArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Job)(nil)).Elem() }
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/streamanalytics/referenceInputBlob.go
sdk/go/azure/streamanalytics/referenceInputBlob.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Reference Input Blob. Reference data (also known as a lookup table) is a finite data set that is static or slowly changing in nature, used to perform a lookup or to correlate with your data stream. Learn more [here](https://docs.microsoft.com/azure/stream-analytics/stream-analytics-use-reference-data#azure-blob-storage). // // ## 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "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 // } // example := streamanalytics.LookupJobOutput(ctx, streamanalytics.GetJobOutputArgs{ // Name: pulumi.String("example-job"), // ResourceGroupName: exampleResourceGroup.Name, // }, nil) // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestoracc"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{ // Name: pulumi.String("example"), // StorageAccountName: exampleAccount.Name, // ContainerAccessType: pulumi.String("private"), // }) // if err != nil { // return err // } // _, err = streamanalytics.NewReferenceInputBlob(ctx, "test", &streamanalytics.ReferenceInputBlobArgs{ // Name: pulumi.String("blob-reference-input"), // StreamAnalyticsJobName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.Name, nil // }).(pulumi.StringPtrOutput)), // ResourceGroupName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.ResourceGroupName, nil // }).(pulumi.StringPtrOutput)), // StorageAccountName: exampleAccount.Name, // StorageAccountKey: exampleAccount.PrimaryAccessKey, // StorageContainerName: exampleContainer.Name, // PathPattern: pulumi.String("some-random-pattern"), // DateFormat: pulumi.String("yyyy/MM/dd"), // TimeFormat: pulumi.String("HH"), // Serialization: &streamanalytics.ReferenceInputBlobSerializationArgs{ // Type: pulumi.String("Json"), // Encoding: pulumi.String("UTF8"), // }, // }) // 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.StreamAnalytics` - 2020-03-01 // // ## Import // // Stream Analytics Reference Input Blob's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/referenceInputBlob:ReferenceInputBlob example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/inputs/input1 // ``` type ReferenceInputBlob struct { pulumi.CustomResourceState // The authentication mode for the Stream Analytics Reference Input. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrOutput `pulumi:"authenticationMode"` // The date format. Wherever `{date}` appears in `pathPattern`, the value of this property is used as the date format instead. DateFormat pulumi.StringOutput `pulumi:"dateFormat"` // The name of the Reference Input Blob. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. PathPattern pulumi.StringOutput `pulumi:"pathPattern"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization ReferenceInputBlobSerializationOutput `pulumi:"serialization"` // The Access Key which should be used to connect to this Storage Account. Required if `authenticationMode` is `ConnectionString`. StorageAccountKey pulumi.StringPtrOutput `pulumi:"storageAccountKey"` // The name of the Storage Account that has the blob container with reference data. StorageAccountName pulumi.StringOutput `pulumi:"storageAccountName"` // The name of the Container within the Storage Account. StorageContainerName pulumi.StringOutput `pulumi:"storageContainerName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringOutput `pulumi:"streamAnalyticsJobName"` // The time format. Wherever `{time}` appears in `pathPattern`, the value of this property is used as the time format instead. TimeFormat pulumi.StringOutput `pulumi:"timeFormat"` } // NewReferenceInputBlob registers a new resource with the given unique name, arguments, and options. func NewReferenceInputBlob(ctx *pulumi.Context, name string, args *ReferenceInputBlobArgs, opts ...pulumi.ResourceOption) (*ReferenceInputBlob, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DateFormat == nil { return nil, errors.New("invalid value for required argument 'DateFormat'") } if args.PathPattern == nil { return nil, errors.New("invalid value for required argument 'PathPattern'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Serialization == nil { return nil, errors.New("invalid value for required argument 'Serialization'") } if args.StorageAccountName == nil { return nil, errors.New("invalid value for required argument 'StorageAccountName'") } if args.StorageContainerName == nil { return nil, errors.New("invalid value for required argument 'StorageContainerName'") } if args.StreamAnalyticsJobName == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobName'") } if args.TimeFormat == nil { return nil, errors.New("invalid value for required argument 'TimeFormat'") } if args.StorageAccountKey != nil { args.StorageAccountKey = pulumi.ToSecret(args.StorageAccountKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "storageAccountKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource ReferenceInputBlob err := ctx.RegisterResource("azure:streamanalytics/referenceInputBlob:ReferenceInputBlob", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetReferenceInputBlob gets an existing ReferenceInputBlob 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 GetReferenceInputBlob(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ReferenceInputBlobState, opts ...pulumi.ResourceOption) (*ReferenceInputBlob, error) { var resource ReferenceInputBlob err := ctx.ReadResource("azure:streamanalytics/referenceInputBlob:ReferenceInputBlob", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ReferenceInputBlob resources. type referenceInputBlobState struct { // The authentication mode for the Stream Analytics Reference Input. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The date format. Wherever `{date}` appears in `pathPattern`, the value of this property is used as the date format instead. DateFormat *string `pulumi:"dateFormat"` // The name of the Reference Input Blob. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. PathPattern *string `pulumi:"pathPattern"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization *ReferenceInputBlobSerialization `pulumi:"serialization"` // The Access Key which should be used to connect to this Storage Account. Required if `authenticationMode` is `ConnectionString`. StorageAccountKey *string `pulumi:"storageAccountKey"` // The name of the Storage Account that has the blob container with reference data. StorageAccountName *string `pulumi:"storageAccountName"` // The name of the Container within the Storage Account. StorageContainerName *string `pulumi:"storageContainerName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName *string `pulumi:"streamAnalyticsJobName"` // The time format. Wherever `{time}` appears in `pathPattern`, the value of this property is used as the time format instead. TimeFormat *string `pulumi:"timeFormat"` } type ReferenceInputBlobState struct { // The authentication mode for the Stream Analytics Reference Input. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The date format. Wherever `{date}` appears in `pathPattern`, the value of this property is used as the date format instead. DateFormat pulumi.StringPtrInput // The name of the Reference Input Blob. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. PathPattern pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `serialization` block as defined below. Serialization ReferenceInputBlobSerializationPtrInput // The Access Key which should be used to connect to this Storage Account. Required if `authenticationMode` is `ConnectionString`. StorageAccountKey pulumi.StringPtrInput // The name of the Storage Account that has the blob container with reference data. StorageAccountName pulumi.StringPtrInput // The name of the Container within the Storage Account. StorageContainerName pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringPtrInput // The time format. Wherever `{time}` appears in `pathPattern`, the value of this property is used as the time format instead. TimeFormat pulumi.StringPtrInput } func (ReferenceInputBlobState) ElementType() reflect.Type { return reflect.TypeOf((*referenceInputBlobState)(nil)).Elem() } type referenceInputBlobArgs struct { // The authentication mode for the Stream Analytics Reference Input. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The date format. Wherever `{date}` appears in `pathPattern`, the value of this property is used as the date format instead. DateFormat string `pulumi:"dateFormat"` // The name of the Reference Input Blob. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. PathPattern string `pulumi:"pathPattern"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization ReferenceInputBlobSerialization `pulumi:"serialization"` // The Access Key which should be used to connect to this Storage Account. Required if `authenticationMode` is `ConnectionString`. StorageAccountKey *string `pulumi:"storageAccountKey"` // The name of the Storage Account that has the blob container with reference data. StorageAccountName string `pulumi:"storageAccountName"` // The name of the Container within the Storage Account. StorageContainerName string `pulumi:"storageContainerName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName string `pulumi:"streamAnalyticsJobName"` // The time format. Wherever `{time}` appears in `pathPattern`, the value of this property is used as the time format instead. TimeFormat string `pulumi:"timeFormat"` } // The set of arguments for constructing a ReferenceInputBlob resource. type ReferenceInputBlobArgs struct { // The authentication mode for the Stream Analytics Reference Input. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The date format. Wherever `{date}` appears in `pathPattern`, the value of this property is used as the date format instead. DateFormat pulumi.StringInput // The name of the Reference Input Blob. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. PathPattern pulumi.StringInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A `serialization` block as defined below. Serialization ReferenceInputBlobSerializationInput // The Access Key which should be used to connect to this Storage Account. Required if `authenticationMode` is `ConnectionString`. StorageAccountKey pulumi.StringPtrInput // The name of the Storage Account that has the blob container with reference data. StorageAccountName pulumi.StringInput // The name of the Container within the Storage Account. StorageContainerName pulumi.StringInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringInput // The time format. Wherever `{time}` appears in `pathPattern`, the value of this property is used as the time format instead. TimeFormat pulumi.StringInput } func (ReferenceInputBlobArgs) ElementType() reflect.Type { return reflect.TypeOf((*referenceInputBlobArgs)(nil)).Elem() } type ReferenceInputBlobInput interface { pulumi.Input ToReferenceInputBlobOutput() ReferenceInputBlobOutput ToReferenceInputBlobOutputWithContext(ctx context.Context) ReferenceInputBlobOutput } func (*ReferenceInputBlob) ElementType() reflect.Type { return reflect.TypeOf((**ReferenceInputBlob)(nil)).Elem() } func (i *ReferenceInputBlob) ToReferenceInputBlobOutput() ReferenceInputBlobOutput { return i.ToReferenceInputBlobOutputWithContext(context.Background()) } func (i *ReferenceInputBlob) ToReferenceInputBlobOutputWithContext(ctx context.Context) ReferenceInputBlobOutput { return pulumi.ToOutputWithContext(ctx, i).(ReferenceInputBlobOutput) } // ReferenceInputBlobArrayInput is an input type that accepts ReferenceInputBlobArray and ReferenceInputBlobArrayOutput values. // You can construct a concrete instance of `ReferenceInputBlobArrayInput` via: // // ReferenceInputBlobArray{ ReferenceInputBlobArgs{...} } type ReferenceInputBlobArrayInput interface { pulumi.Input ToReferenceInputBlobArrayOutput() ReferenceInputBlobArrayOutput ToReferenceInputBlobArrayOutputWithContext(context.Context) ReferenceInputBlobArrayOutput } type ReferenceInputBlobArray []ReferenceInputBlobInput func (ReferenceInputBlobArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ReferenceInputBlob)(nil)).Elem() } func (i ReferenceInputBlobArray) ToReferenceInputBlobArrayOutput() ReferenceInputBlobArrayOutput { return i.ToReferenceInputBlobArrayOutputWithContext(context.Background()) } func (i ReferenceInputBlobArray) ToReferenceInputBlobArrayOutputWithContext(ctx context.Context) ReferenceInputBlobArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ReferenceInputBlobArrayOutput) } // ReferenceInputBlobMapInput is an input type that accepts ReferenceInputBlobMap and ReferenceInputBlobMapOutput values. // You can construct a concrete instance of `ReferenceInputBlobMapInput` via: // // ReferenceInputBlobMap{ "key": ReferenceInputBlobArgs{...} } type ReferenceInputBlobMapInput interface { pulumi.Input ToReferenceInputBlobMapOutput() ReferenceInputBlobMapOutput ToReferenceInputBlobMapOutputWithContext(context.Context) ReferenceInputBlobMapOutput } type ReferenceInputBlobMap map[string]ReferenceInputBlobInput func (ReferenceInputBlobMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ReferenceInputBlob)(nil)).Elem() } func (i ReferenceInputBlobMap) ToReferenceInputBlobMapOutput() ReferenceInputBlobMapOutput { return i.ToReferenceInputBlobMapOutputWithContext(context.Background()) } func (i ReferenceInputBlobMap) ToReferenceInputBlobMapOutputWithContext(ctx context.Context) ReferenceInputBlobMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ReferenceInputBlobMapOutput) } type ReferenceInputBlobOutput struct{ *pulumi.OutputState } func (ReferenceInputBlobOutput) ElementType() reflect.Type { return reflect.TypeOf((**ReferenceInputBlob)(nil)).Elem() } func (o ReferenceInputBlobOutput) ToReferenceInputBlobOutput() ReferenceInputBlobOutput { return o } func (o ReferenceInputBlobOutput) ToReferenceInputBlobOutputWithContext(ctx context.Context) ReferenceInputBlobOutput { return o } // The authentication mode for the Stream Analytics Reference Input. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. func (o ReferenceInputBlobOutput) AuthenticationMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *ReferenceInputBlob) pulumi.StringPtrOutput { return v.AuthenticationMode }).(pulumi.StringPtrOutput) } // The date format. Wherever `{date}` appears in `pathPattern`, the value of this property is used as the date format instead. func (o ReferenceInputBlobOutput) DateFormat() pulumi.StringOutput { return o.ApplyT(func(v *ReferenceInputBlob) pulumi.StringOutput { return v.DateFormat }).(pulumi.StringOutput) } // The name of the Reference Input Blob. Changing this forces a new resource to be created. func (o ReferenceInputBlobOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ReferenceInputBlob) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. func (o ReferenceInputBlobOutput) PathPattern() pulumi.StringOutput { return o.ApplyT(func(v *ReferenceInputBlob) pulumi.StringOutput { return v.PathPattern }).(pulumi.StringOutput) } // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. func (o ReferenceInputBlobOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ReferenceInputBlob) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `serialization` block as defined below. func (o ReferenceInputBlobOutput) Serialization() ReferenceInputBlobSerializationOutput { return o.ApplyT(func(v *ReferenceInputBlob) ReferenceInputBlobSerializationOutput { return v.Serialization }).(ReferenceInputBlobSerializationOutput) } // The Access Key which should be used to connect to this Storage Account. Required if `authenticationMode` is `ConnectionString`. func (o ReferenceInputBlobOutput) StorageAccountKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *ReferenceInputBlob) pulumi.StringPtrOutput { return v.StorageAccountKey }).(pulumi.StringPtrOutput) } // The name of the Storage Account that has the blob container with reference data. func (o ReferenceInputBlobOutput) StorageAccountName() pulumi.StringOutput { return o.ApplyT(func(v *ReferenceInputBlob) pulumi.StringOutput { return v.StorageAccountName }).(pulumi.StringOutput) } // The name of the Container within the Storage Account. func (o ReferenceInputBlobOutput) StorageContainerName() pulumi.StringOutput { return o.ApplyT(func(v *ReferenceInputBlob) pulumi.StringOutput { return v.StorageContainerName }).(pulumi.StringOutput) } // The name of the Stream Analytics Job. Changing this forces a new resource to be created. func (o ReferenceInputBlobOutput) StreamAnalyticsJobName() pulumi.StringOutput { return o.ApplyT(func(v *ReferenceInputBlob) pulumi.StringOutput { return v.StreamAnalyticsJobName }).(pulumi.StringOutput) } // The time format. Wherever `{time}` appears in `pathPattern`, the value of this property is used as the time format instead. func (o ReferenceInputBlobOutput) TimeFormat() pulumi.StringOutput { return o.ApplyT(func(v *ReferenceInputBlob) pulumi.StringOutput { return v.TimeFormat }).(pulumi.StringOutput) } type ReferenceInputBlobArrayOutput struct{ *pulumi.OutputState } func (ReferenceInputBlobArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ReferenceInputBlob)(nil)).Elem() } func (o ReferenceInputBlobArrayOutput) ToReferenceInputBlobArrayOutput() ReferenceInputBlobArrayOutput { return o } func (o ReferenceInputBlobArrayOutput) ToReferenceInputBlobArrayOutputWithContext(ctx context.Context) ReferenceInputBlobArrayOutput { return o } func (o ReferenceInputBlobArrayOutput) Index(i pulumi.IntInput) ReferenceInputBlobOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ReferenceInputBlob { return vs[0].([]*ReferenceInputBlob)[vs[1].(int)] }).(ReferenceInputBlobOutput) } type ReferenceInputBlobMapOutput struct{ *pulumi.OutputState } func (ReferenceInputBlobMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ReferenceInputBlob)(nil)).Elem() } func (o ReferenceInputBlobMapOutput) ToReferenceInputBlobMapOutput() ReferenceInputBlobMapOutput { return o } func (o ReferenceInputBlobMapOutput) ToReferenceInputBlobMapOutputWithContext(ctx context.Context) ReferenceInputBlobMapOutput { return o } func (o ReferenceInputBlobMapOutput) MapIndex(k pulumi.StringInput) ReferenceInputBlobOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ReferenceInputBlob { return vs[0].(map[string]*ReferenceInputBlob)[vs[1].(string)] }).(ReferenceInputBlobOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ReferenceInputBlobInput)(nil)).Elem(), &ReferenceInputBlob{}) pulumi.RegisterInputType(reflect.TypeOf((*ReferenceInputBlobArrayInput)(nil)).Elem(), ReferenceInputBlobArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ReferenceInputBlobMapInput)(nil)).Elem(), ReferenceInputBlobMap{}) pulumi.RegisterOutputType(ReferenceInputBlobOutput{}) pulumi.RegisterOutputType(ReferenceInputBlobArrayOutput{}) pulumi.RegisterOutputType(ReferenceInputBlobMapOutput{}) }
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/streamanalytics/outputEventHub.go
sdk/go/azure/streamanalytics/outputEventHub.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Output to an EventHub. // // ## 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/eventhub" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "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("rg-example"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // example := streamanalytics.LookupJobOutput(ctx, streamanalytics.GetJobOutputArgs{ // Name: pulumi.String("example-job"), // ResourceGroupName: exampleResourceGroup.Name, // }, nil) // exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{ // Name: pulumi.String("example-ehnamespace"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // Sku: pulumi.String("Standard"), // Capacity: pulumi.Int(1), // }) // if err != nil { // return err // } // exampleEventHub, err := eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{ // Name: pulumi.String("example-eventhub"), // NamespaceName: exampleEventHubNamespace.Name, // ResourceGroupName: exampleResourceGroup.Name, // PartitionCount: pulumi.Int(2), // MessageRetention: pulumi.Int(1), // }) // if err != nil { // return err // } // _, err = streamanalytics.NewOutputEventHub(ctx, "example", &streamanalytics.OutputEventHubArgs{ // Name: pulumi.String("output-to-eventhub"), // StreamAnalyticsJobName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.Name, nil // }).(pulumi.StringPtrOutput)), // ResourceGroupName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.ResourceGroupName, nil // }).(pulumi.StringPtrOutput)), // EventhubName: exampleEventHub.Name, // ServicebusNamespace: exampleEventHubNamespace.Name, // SharedAccessPolicyKey: exampleEventHubNamespace.DefaultPrimaryKey, // SharedAccessPolicyName: pulumi.String("RootManageSharedAccessKey"), // Serialization: &streamanalytics.OutputEventHubSerializationArgs{ // Type: pulumi.String("Avro"), // }, // }) // 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.StreamAnalytics` - 2021-10-01-preview // // ## Import // // Stream Analytics Outputs to an EventHub can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/outputEventHub:OutputEventHub example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/outputs/output1 // ``` type OutputEventHub struct { pulumi.CustomResourceState // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrOutput `pulumi:"authenticationMode"` // The name of the Event Hub. EventhubName pulumi.StringOutput `pulumi:"eventhubName"` // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The column that is used for the Event Hub partition key. PartitionKey pulumi.StringPtrOutput `pulumi:"partitionKey"` // A list of property columns to add to the Event Hub output. PropertyColumns pulumi.StringArrayOutput `pulumi:"propertyColumns"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization OutputEventHubSerializationOutput `pulumi:"serialization"` // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace pulumi.StringOutput `pulumi:"servicebusNamespace"` // The shared access policy key for the specified shared access policy. Required when `authenticationMode` is set to `ConnectionString`. SharedAccessPolicyKey pulumi.StringPtrOutput `pulumi:"sharedAccessPolicyKey"` // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required when `authenticationMode` is set to `ConnectionString`. SharedAccessPolicyName pulumi.StringPtrOutput `pulumi:"sharedAccessPolicyName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringOutput `pulumi:"streamAnalyticsJobName"` } // NewOutputEventHub registers a new resource with the given unique name, arguments, and options. func NewOutputEventHub(ctx *pulumi.Context, name string, args *OutputEventHubArgs, opts ...pulumi.ResourceOption) (*OutputEventHub, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.EventhubName == nil { return nil, errors.New("invalid value for required argument 'EventhubName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Serialization == nil { return nil, errors.New("invalid value for required argument 'Serialization'") } if args.ServicebusNamespace == nil { return nil, errors.New("invalid value for required argument 'ServicebusNamespace'") } if args.StreamAnalyticsJobName == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobName'") } if args.SharedAccessPolicyKey != nil { args.SharedAccessPolicyKey = pulumi.ToSecret(args.SharedAccessPolicyKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "sharedAccessPolicyKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource OutputEventHub err := ctx.RegisterResource("azure:streamanalytics/outputEventHub:OutputEventHub", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetOutputEventHub gets an existing OutputEventHub 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 GetOutputEventHub(ctx *pulumi.Context, name string, id pulumi.IDInput, state *OutputEventHubState, opts ...pulumi.ResourceOption) (*OutputEventHub, error) { var resource OutputEventHub err := ctx.ReadResource("azure:streamanalytics/outputEventHub:OutputEventHub", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering OutputEventHub resources. type outputEventHubState struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The name of the Event Hub. EventhubName *string `pulumi:"eventhubName"` // The name of the Stream Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The column that is used for the Event Hub partition key. PartitionKey *string `pulumi:"partitionKey"` // A list of property columns to add to the Event Hub output. PropertyColumns []string `pulumi:"propertyColumns"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization *OutputEventHubSerialization `pulumi:"serialization"` // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace *string `pulumi:"servicebusNamespace"` // The shared access policy key for the specified shared access policy. Required when `authenticationMode` is set to `ConnectionString`. SharedAccessPolicyKey *string `pulumi:"sharedAccessPolicyKey"` // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required when `authenticationMode` is set to `ConnectionString`. SharedAccessPolicyName *string `pulumi:"sharedAccessPolicyName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName *string `pulumi:"streamAnalyticsJobName"` } type OutputEventHubState struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The name of the Event Hub. EventhubName pulumi.StringPtrInput // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The column that is used for the Event Hub partition key. PartitionKey pulumi.StringPtrInput // A list of property columns to add to the Event Hub output. PropertyColumns pulumi.StringArrayInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `serialization` block as defined below. Serialization OutputEventHubSerializationPtrInput // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace pulumi.StringPtrInput // The shared access policy key for the specified shared access policy. Required when `authenticationMode` is set to `ConnectionString`. SharedAccessPolicyKey pulumi.StringPtrInput // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required when `authenticationMode` is set to `ConnectionString`. SharedAccessPolicyName pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringPtrInput } func (OutputEventHubState) ElementType() reflect.Type { return reflect.TypeOf((*outputEventHubState)(nil)).Elem() } type outputEventHubArgs struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The name of the Event Hub. EventhubName string `pulumi:"eventhubName"` // The name of the Stream Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The column that is used for the Event Hub partition key. PartitionKey *string `pulumi:"partitionKey"` // A list of property columns to add to the Event Hub output. PropertyColumns []string `pulumi:"propertyColumns"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization OutputEventHubSerialization `pulumi:"serialization"` // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace string `pulumi:"servicebusNamespace"` // The shared access policy key for the specified shared access policy. Required when `authenticationMode` is set to `ConnectionString`. SharedAccessPolicyKey *string `pulumi:"sharedAccessPolicyKey"` // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required when `authenticationMode` is set to `ConnectionString`. SharedAccessPolicyName *string `pulumi:"sharedAccessPolicyName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName string `pulumi:"streamAnalyticsJobName"` } // The set of arguments for constructing a OutputEventHub resource. type OutputEventHubArgs struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The name of the Event Hub. EventhubName pulumi.StringInput // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The column that is used for the Event Hub partition key. PartitionKey pulumi.StringPtrInput // A list of property columns to add to the Event Hub output. PropertyColumns pulumi.StringArrayInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A `serialization` block as defined below. Serialization OutputEventHubSerializationInput // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace pulumi.StringInput // The shared access policy key for the specified shared access policy. Required when `authenticationMode` is set to `ConnectionString`. SharedAccessPolicyKey pulumi.StringPtrInput // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required when `authenticationMode` is set to `ConnectionString`. SharedAccessPolicyName pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringInput } func (OutputEventHubArgs) ElementType() reflect.Type { return reflect.TypeOf((*outputEventHubArgs)(nil)).Elem() } type OutputEventHubInput interface { pulumi.Input ToOutputEventHubOutput() OutputEventHubOutput ToOutputEventHubOutputWithContext(ctx context.Context) OutputEventHubOutput } func (*OutputEventHub) ElementType() reflect.Type { return reflect.TypeOf((**OutputEventHub)(nil)).Elem() } func (i *OutputEventHub) ToOutputEventHubOutput() OutputEventHubOutput { return i.ToOutputEventHubOutputWithContext(context.Background()) } func (i *OutputEventHub) ToOutputEventHubOutputWithContext(ctx context.Context) OutputEventHubOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputEventHubOutput) } // OutputEventHubArrayInput is an input type that accepts OutputEventHubArray and OutputEventHubArrayOutput values. // You can construct a concrete instance of `OutputEventHubArrayInput` via: // // OutputEventHubArray{ OutputEventHubArgs{...} } type OutputEventHubArrayInput interface { pulumi.Input ToOutputEventHubArrayOutput() OutputEventHubArrayOutput ToOutputEventHubArrayOutputWithContext(context.Context) OutputEventHubArrayOutput } type OutputEventHubArray []OutputEventHubInput func (OutputEventHubArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputEventHub)(nil)).Elem() } func (i OutputEventHubArray) ToOutputEventHubArrayOutput() OutputEventHubArrayOutput { return i.ToOutputEventHubArrayOutputWithContext(context.Background()) } func (i OutputEventHubArray) ToOutputEventHubArrayOutputWithContext(ctx context.Context) OutputEventHubArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputEventHubArrayOutput) } // OutputEventHubMapInput is an input type that accepts OutputEventHubMap and OutputEventHubMapOutput values. // You can construct a concrete instance of `OutputEventHubMapInput` via: // // OutputEventHubMap{ "key": OutputEventHubArgs{...} } type OutputEventHubMapInput interface { pulumi.Input ToOutputEventHubMapOutput() OutputEventHubMapOutput ToOutputEventHubMapOutputWithContext(context.Context) OutputEventHubMapOutput } type OutputEventHubMap map[string]OutputEventHubInput func (OutputEventHubMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputEventHub)(nil)).Elem() } func (i OutputEventHubMap) ToOutputEventHubMapOutput() OutputEventHubMapOutput { return i.ToOutputEventHubMapOutputWithContext(context.Background()) } func (i OutputEventHubMap) ToOutputEventHubMapOutputWithContext(ctx context.Context) OutputEventHubMapOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputEventHubMapOutput) } type OutputEventHubOutput struct{ *pulumi.OutputState } func (OutputEventHubOutput) ElementType() reflect.Type { return reflect.TypeOf((**OutputEventHub)(nil)).Elem() } func (o OutputEventHubOutput) ToOutputEventHubOutput() OutputEventHubOutput { return o } func (o OutputEventHubOutput) ToOutputEventHubOutputWithContext(ctx context.Context) OutputEventHubOutput { return o } // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. func (o OutputEventHubOutput) AuthenticationMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputEventHub) pulumi.StringPtrOutput { return v.AuthenticationMode }).(pulumi.StringPtrOutput) } // The name of the Event Hub. func (o OutputEventHubOutput) EventhubName() pulumi.StringOutput { return o.ApplyT(func(v *OutputEventHub) pulumi.StringOutput { return v.EventhubName }).(pulumi.StringOutput) } // The name of the Stream Output. Changing this forces a new resource to be created. func (o OutputEventHubOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *OutputEventHub) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The column that is used for the Event Hub partition key. func (o OutputEventHubOutput) PartitionKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputEventHub) pulumi.StringPtrOutput { return v.PartitionKey }).(pulumi.StringPtrOutput) } // A list of property columns to add to the Event Hub output. func (o OutputEventHubOutput) PropertyColumns() pulumi.StringArrayOutput { return o.ApplyT(func(v *OutputEventHub) pulumi.StringArrayOutput { return v.PropertyColumns }).(pulumi.StringArrayOutput) } // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. func (o OutputEventHubOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *OutputEventHub) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `serialization` block as defined below. func (o OutputEventHubOutput) Serialization() OutputEventHubSerializationOutput { return o.ApplyT(func(v *OutputEventHub) OutputEventHubSerializationOutput { return v.Serialization }).(OutputEventHubSerializationOutput) } // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. func (o OutputEventHubOutput) ServicebusNamespace() pulumi.StringOutput { return o.ApplyT(func(v *OutputEventHub) pulumi.StringOutput { return v.ServicebusNamespace }).(pulumi.StringOutput) } // The shared access policy key for the specified shared access policy. Required when `authenticationMode` is set to `ConnectionString`. func (o OutputEventHubOutput) SharedAccessPolicyKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputEventHub) pulumi.StringPtrOutput { return v.SharedAccessPolicyKey }).(pulumi.StringPtrOutput) } // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required when `authenticationMode` is set to `ConnectionString`. func (o OutputEventHubOutput) SharedAccessPolicyName() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputEventHub) pulumi.StringPtrOutput { return v.SharedAccessPolicyName }).(pulumi.StringPtrOutput) } // The name of the Stream Analytics Job. Changing this forces a new resource to be created. func (o OutputEventHubOutput) StreamAnalyticsJobName() pulumi.StringOutput { return o.ApplyT(func(v *OutputEventHub) pulumi.StringOutput { return v.StreamAnalyticsJobName }).(pulumi.StringOutput) } type OutputEventHubArrayOutput struct{ *pulumi.OutputState } func (OutputEventHubArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputEventHub)(nil)).Elem() } func (o OutputEventHubArrayOutput) ToOutputEventHubArrayOutput() OutputEventHubArrayOutput { return o } func (o OutputEventHubArrayOutput) ToOutputEventHubArrayOutputWithContext(ctx context.Context) OutputEventHubArrayOutput { return o } func (o OutputEventHubArrayOutput) Index(i pulumi.IntInput) OutputEventHubOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *OutputEventHub { return vs[0].([]*OutputEventHub)[vs[1].(int)] }).(OutputEventHubOutput) } type OutputEventHubMapOutput struct{ *pulumi.OutputState } func (OutputEventHubMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputEventHub)(nil)).Elem() } func (o OutputEventHubMapOutput) ToOutputEventHubMapOutput() OutputEventHubMapOutput { return o } func (o OutputEventHubMapOutput) ToOutputEventHubMapOutputWithContext(ctx context.Context) OutputEventHubMapOutput { return o } func (o OutputEventHubMapOutput) MapIndex(k pulumi.StringInput) OutputEventHubOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *OutputEventHub { return vs[0].(map[string]*OutputEventHub)[vs[1].(string)] }).(OutputEventHubOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*OutputEventHubInput)(nil)).Elem(), &OutputEventHub{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputEventHubArrayInput)(nil)).Elem(), OutputEventHubArray{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputEventHubMapInput)(nil)).Elem(), OutputEventHubMap{}) pulumi.RegisterOutputType(OutputEventHubOutput{}) pulumi.RegisterOutputType(OutputEventHubArrayOutput{}) pulumi.RegisterOutputType(OutputEventHubMapOutput{}) }
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/streamanalytics/referenceInputMssql.go
sdk/go/azure/streamanalytics/referenceInputMssql.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Reference Input from MS SQL. Reference data (also known as a lookup table) is a finite data set that is static or slowly changing in nature, used to perform a lookup or to correlate with your data stream. Learn more [here](https://docs.microsoft.com/azure/stream-analytics/stream-analytics-use-reference-data#azure-sql-database). // // ## 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/mssql" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "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 // } // example := streamanalytics.LookupJobOutput(ctx, streamanalytics.GetJobOutputArgs{ // Name: pulumi.String("example-job"), // ResourceGroupName: exampleResourceGroup.Name, // }, nil) // exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{ // Name: pulumi.String("example-sqlserver"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // Version: pulumi.String("12.0"), // AdministratorLogin: pulumi.String("admin"), // AdministratorLoginPassword: pulumi.String("password"), // }) // if err != nil { // return err // } // exampleDatabase, err := mssql.NewDatabase(ctx, "example", &mssql.DatabaseArgs{ // Name: pulumi.String("example-db"), // ServerId: exampleServer.ID(), // }) // if err != nil { // return err // } // _, err = streamanalytics.NewReferenceInputMssql(ctx, "example", &streamanalytics.ReferenceInputMssqlArgs{ // Name: pulumi.String("example-reference-input"), // ResourceGroupName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.ResourceGroupName, nil // }).(pulumi.StringPtrOutput)), // StreamAnalyticsJobName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.Name, nil // }).(pulumi.StringPtrOutput)), // Server: exampleServer.FullyQualifiedDomainName, // Database: exampleDatabase.Name, // Username: pulumi.String("exampleuser"), // Password: pulumi.String("examplepassword"), // RefreshType: pulumi.String("RefreshPeriodicallyWithFull"), // RefreshIntervalDuration: pulumi.String("00:20:00"), // FullSnapshotQuery: pulumi.String(" SELECT *\n INTO [YourOutputAlias]\n FROM [YourInputAlias]\n"), // }) // 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.StreamAnalytics` - 2020-03-01 // // ## Import // // Stream Analytics can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/referenceInputMssql:ReferenceInputMssql example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/inputs/input1 // ``` type ReferenceInputMssql struct { pulumi.CustomResourceState // The MS SQL database name where the reference data exists. Database pulumi.StringOutput `pulumi:"database"` // The query used to retrieve incremental changes in the reference data from the MS SQL database. Cannot be set when `refreshType` is `Static`. DeltaSnapshotQuery pulumi.StringPtrOutput `pulumi:"deltaSnapshotQuery"` // The query used to retrieve the reference data from the MS SQL database. FullSnapshotQuery pulumi.StringOutput `pulumi:"fullSnapshotQuery"` // The name of the Reference Input MS SQL data. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The password to connect to the MS SQL database. Password pulumi.StringOutput `pulumi:"password"` // The frequency in `hh:mm:ss` with which the reference data should be retrieved from the MS SQL database e.g. `00:20:00` for every 20 minutes. Must be set when `refreshType` is `RefreshPeriodicallyWithFull` or `RefreshPeriodicallyWithDelta`. RefreshIntervalDuration pulumi.StringPtrOutput `pulumi:"refreshIntervalDuration"` // Defines whether and how the reference data should be refreshed. Accepted values are `Static`, `RefreshPeriodicallyWithFull` and `RefreshPeriodicallyWithDelta`. RefreshType pulumi.StringOutput `pulumi:"refreshType"` // The name of the Resource Group where the Stream Analytics Job should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The fully qualified domain name of the MS SQL server. Server pulumi.StringOutput `pulumi:"server"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringOutput `pulumi:"streamAnalyticsJobName"` // The name of the table in the Azure SQL database. Table pulumi.StringPtrOutput `pulumi:"table"` // The username to connect to the MS SQL database. Username pulumi.StringOutput `pulumi:"username"` } // NewReferenceInputMssql registers a new resource with the given unique name, arguments, and options. func NewReferenceInputMssql(ctx *pulumi.Context, name string, args *ReferenceInputMssqlArgs, opts ...pulumi.ResourceOption) (*ReferenceInputMssql, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Database == nil { return nil, errors.New("invalid value for required argument 'Database'") } if args.FullSnapshotQuery == nil { return nil, errors.New("invalid value for required argument 'FullSnapshotQuery'") } if args.Password == nil { return nil, errors.New("invalid value for required argument 'Password'") } if args.RefreshType == nil { return nil, errors.New("invalid value for required argument 'RefreshType'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Server == nil { return nil, errors.New("invalid value for required argument 'Server'") } if args.StreamAnalyticsJobName == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobName'") } if args.Username == nil { return nil, errors.New("invalid value for required argument 'Username'") } if args.Password != nil { args.Password = pulumi.ToSecret(args.Password).(pulumi.StringInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "password", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource ReferenceInputMssql err := ctx.RegisterResource("azure:streamanalytics/referenceInputMssql:ReferenceInputMssql", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetReferenceInputMssql gets an existing ReferenceInputMssql 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 GetReferenceInputMssql(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ReferenceInputMssqlState, opts ...pulumi.ResourceOption) (*ReferenceInputMssql, error) { var resource ReferenceInputMssql err := ctx.ReadResource("azure:streamanalytics/referenceInputMssql:ReferenceInputMssql", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ReferenceInputMssql resources. type referenceInputMssqlState struct { // The MS SQL database name where the reference data exists. Database *string `pulumi:"database"` // The query used to retrieve incremental changes in the reference data from the MS SQL database. Cannot be set when `refreshType` is `Static`. DeltaSnapshotQuery *string `pulumi:"deltaSnapshotQuery"` // The query used to retrieve the reference data from the MS SQL database. FullSnapshotQuery *string `pulumi:"fullSnapshotQuery"` // The name of the Reference Input MS SQL data. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The password to connect to the MS SQL database. Password *string `pulumi:"password"` // The frequency in `hh:mm:ss` with which the reference data should be retrieved from the MS SQL database e.g. `00:20:00` for every 20 minutes. Must be set when `refreshType` is `RefreshPeriodicallyWithFull` or `RefreshPeriodicallyWithDelta`. RefreshIntervalDuration *string `pulumi:"refreshIntervalDuration"` // Defines whether and how the reference data should be refreshed. Accepted values are `Static`, `RefreshPeriodicallyWithFull` and `RefreshPeriodicallyWithDelta`. RefreshType *string `pulumi:"refreshType"` // The name of the Resource Group where the Stream Analytics Job should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The fully qualified domain name of the MS SQL server. Server *string `pulumi:"server"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName *string `pulumi:"streamAnalyticsJobName"` // The name of the table in the Azure SQL database. Table *string `pulumi:"table"` // The username to connect to the MS SQL database. Username *string `pulumi:"username"` } type ReferenceInputMssqlState struct { // The MS SQL database name where the reference data exists. Database pulumi.StringPtrInput // The query used to retrieve incremental changes in the reference data from the MS SQL database. Cannot be set when `refreshType` is `Static`. DeltaSnapshotQuery pulumi.StringPtrInput // The query used to retrieve the reference data from the MS SQL database. FullSnapshotQuery pulumi.StringPtrInput // The name of the Reference Input MS SQL data. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The password to connect to the MS SQL database. Password pulumi.StringPtrInput // The frequency in `hh:mm:ss` with which the reference data should be retrieved from the MS SQL database e.g. `00:20:00` for every 20 minutes. Must be set when `refreshType` is `RefreshPeriodicallyWithFull` or `RefreshPeriodicallyWithDelta`. RefreshIntervalDuration pulumi.StringPtrInput // Defines whether and how the reference data should be refreshed. Accepted values are `Static`, `RefreshPeriodicallyWithFull` and `RefreshPeriodicallyWithDelta`. RefreshType pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Job should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The fully qualified domain name of the MS SQL server. Server pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringPtrInput // The name of the table in the Azure SQL database. Table pulumi.StringPtrInput // The username to connect to the MS SQL database. Username pulumi.StringPtrInput } func (ReferenceInputMssqlState) ElementType() reflect.Type { return reflect.TypeOf((*referenceInputMssqlState)(nil)).Elem() } type referenceInputMssqlArgs struct { // The MS SQL database name where the reference data exists. Database string `pulumi:"database"` // The query used to retrieve incremental changes in the reference data from the MS SQL database. Cannot be set when `refreshType` is `Static`. DeltaSnapshotQuery *string `pulumi:"deltaSnapshotQuery"` // The query used to retrieve the reference data from the MS SQL database. FullSnapshotQuery string `pulumi:"fullSnapshotQuery"` // The name of the Reference Input MS SQL data. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The password to connect to the MS SQL database. Password string `pulumi:"password"` // The frequency in `hh:mm:ss` with which the reference data should be retrieved from the MS SQL database e.g. `00:20:00` for every 20 minutes. Must be set when `refreshType` is `RefreshPeriodicallyWithFull` or `RefreshPeriodicallyWithDelta`. RefreshIntervalDuration *string `pulumi:"refreshIntervalDuration"` // Defines whether and how the reference data should be refreshed. Accepted values are `Static`, `RefreshPeriodicallyWithFull` and `RefreshPeriodicallyWithDelta`. RefreshType string `pulumi:"refreshType"` // The name of the Resource Group where the Stream Analytics Job should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The fully qualified domain name of the MS SQL server. Server string `pulumi:"server"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName string `pulumi:"streamAnalyticsJobName"` // The name of the table in the Azure SQL database. Table *string `pulumi:"table"` // The username to connect to the MS SQL database. Username string `pulumi:"username"` } // The set of arguments for constructing a ReferenceInputMssql resource. type ReferenceInputMssqlArgs struct { // The MS SQL database name where the reference data exists. Database pulumi.StringInput // The query used to retrieve incremental changes in the reference data from the MS SQL database. Cannot be set when `refreshType` is `Static`. DeltaSnapshotQuery pulumi.StringPtrInput // The query used to retrieve the reference data from the MS SQL database. FullSnapshotQuery pulumi.StringInput // The name of the Reference Input MS SQL data. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The password to connect to the MS SQL database. Password pulumi.StringInput // The frequency in `hh:mm:ss` with which the reference data should be retrieved from the MS SQL database e.g. `00:20:00` for every 20 minutes. Must be set when `refreshType` is `RefreshPeriodicallyWithFull` or `RefreshPeriodicallyWithDelta`. RefreshIntervalDuration pulumi.StringPtrInput // Defines whether and how the reference data should be refreshed. Accepted values are `Static`, `RefreshPeriodicallyWithFull` and `RefreshPeriodicallyWithDelta`. RefreshType pulumi.StringInput // The name of the Resource Group where the Stream Analytics Job should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The fully qualified domain name of the MS SQL server. Server pulumi.StringInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringInput // The name of the table in the Azure SQL database. Table pulumi.StringPtrInput // The username to connect to the MS SQL database. Username pulumi.StringInput } func (ReferenceInputMssqlArgs) ElementType() reflect.Type { return reflect.TypeOf((*referenceInputMssqlArgs)(nil)).Elem() } type ReferenceInputMssqlInput interface { pulumi.Input ToReferenceInputMssqlOutput() ReferenceInputMssqlOutput ToReferenceInputMssqlOutputWithContext(ctx context.Context) ReferenceInputMssqlOutput } func (*ReferenceInputMssql) ElementType() reflect.Type { return reflect.TypeOf((**ReferenceInputMssql)(nil)).Elem() } func (i *ReferenceInputMssql) ToReferenceInputMssqlOutput() ReferenceInputMssqlOutput { return i.ToReferenceInputMssqlOutputWithContext(context.Background()) } func (i *ReferenceInputMssql) ToReferenceInputMssqlOutputWithContext(ctx context.Context) ReferenceInputMssqlOutput { return pulumi.ToOutputWithContext(ctx, i).(ReferenceInputMssqlOutput) } // ReferenceInputMssqlArrayInput is an input type that accepts ReferenceInputMssqlArray and ReferenceInputMssqlArrayOutput values. // You can construct a concrete instance of `ReferenceInputMssqlArrayInput` via: // // ReferenceInputMssqlArray{ ReferenceInputMssqlArgs{...} } type ReferenceInputMssqlArrayInput interface { pulumi.Input ToReferenceInputMssqlArrayOutput() ReferenceInputMssqlArrayOutput ToReferenceInputMssqlArrayOutputWithContext(context.Context) ReferenceInputMssqlArrayOutput } type ReferenceInputMssqlArray []ReferenceInputMssqlInput func (ReferenceInputMssqlArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ReferenceInputMssql)(nil)).Elem() } func (i ReferenceInputMssqlArray) ToReferenceInputMssqlArrayOutput() ReferenceInputMssqlArrayOutput { return i.ToReferenceInputMssqlArrayOutputWithContext(context.Background()) } func (i ReferenceInputMssqlArray) ToReferenceInputMssqlArrayOutputWithContext(ctx context.Context) ReferenceInputMssqlArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ReferenceInputMssqlArrayOutput) } // ReferenceInputMssqlMapInput is an input type that accepts ReferenceInputMssqlMap and ReferenceInputMssqlMapOutput values. // You can construct a concrete instance of `ReferenceInputMssqlMapInput` via: // // ReferenceInputMssqlMap{ "key": ReferenceInputMssqlArgs{...} } type ReferenceInputMssqlMapInput interface { pulumi.Input ToReferenceInputMssqlMapOutput() ReferenceInputMssqlMapOutput ToReferenceInputMssqlMapOutputWithContext(context.Context) ReferenceInputMssqlMapOutput } type ReferenceInputMssqlMap map[string]ReferenceInputMssqlInput func (ReferenceInputMssqlMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ReferenceInputMssql)(nil)).Elem() } func (i ReferenceInputMssqlMap) ToReferenceInputMssqlMapOutput() ReferenceInputMssqlMapOutput { return i.ToReferenceInputMssqlMapOutputWithContext(context.Background()) } func (i ReferenceInputMssqlMap) ToReferenceInputMssqlMapOutputWithContext(ctx context.Context) ReferenceInputMssqlMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ReferenceInputMssqlMapOutput) } type ReferenceInputMssqlOutput struct{ *pulumi.OutputState } func (ReferenceInputMssqlOutput) ElementType() reflect.Type { return reflect.TypeOf((**ReferenceInputMssql)(nil)).Elem() } func (o ReferenceInputMssqlOutput) ToReferenceInputMssqlOutput() ReferenceInputMssqlOutput { return o } func (o ReferenceInputMssqlOutput) ToReferenceInputMssqlOutputWithContext(ctx context.Context) ReferenceInputMssqlOutput { return o } // The MS SQL database name where the reference data exists. func (o ReferenceInputMssqlOutput) Database() pulumi.StringOutput { return o.ApplyT(func(v *ReferenceInputMssql) pulumi.StringOutput { return v.Database }).(pulumi.StringOutput) } // The query used to retrieve incremental changes in the reference data from the MS SQL database. Cannot be set when `refreshType` is `Static`. func (o ReferenceInputMssqlOutput) DeltaSnapshotQuery() pulumi.StringPtrOutput { return o.ApplyT(func(v *ReferenceInputMssql) pulumi.StringPtrOutput { return v.DeltaSnapshotQuery }).(pulumi.StringPtrOutput) } // The query used to retrieve the reference data from the MS SQL database. func (o ReferenceInputMssqlOutput) FullSnapshotQuery() pulumi.StringOutput { return o.ApplyT(func(v *ReferenceInputMssql) pulumi.StringOutput { return v.FullSnapshotQuery }).(pulumi.StringOutput) } // The name of the Reference Input MS SQL data. Changing this forces a new resource to be created. func (o ReferenceInputMssqlOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ReferenceInputMssql) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The password to connect to the MS SQL database. func (o ReferenceInputMssqlOutput) Password() pulumi.StringOutput { return o.ApplyT(func(v *ReferenceInputMssql) pulumi.StringOutput { return v.Password }).(pulumi.StringOutput) } // The frequency in `hh:mm:ss` with which the reference data should be retrieved from the MS SQL database e.g. `00:20:00` for every 20 minutes. Must be set when `refreshType` is `RefreshPeriodicallyWithFull` or `RefreshPeriodicallyWithDelta`. func (o ReferenceInputMssqlOutput) RefreshIntervalDuration() pulumi.StringPtrOutput { return o.ApplyT(func(v *ReferenceInputMssql) pulumi.StringPtrOutput { return v.RefreshIntervalDuration }).(pulumi.StringPtrOutput) } // Defines whether and how the reference data should be refreshed. Accepted values are `Static`, `RefreshPeriodicallyWithFull` and `RefreshPeriodicallyWithDelta`. func (o ReferenceInputMssqlOutput) RefreshType() pulumi.StringOutput { return o.ApplyT(func(v *ReferenceInputMssql) pulumi.StringOutput { return v.RefreshType }).(pulumi.StringOutput) } // The name of the Resource Group where the Stream Analytics Job should exist. Changing this forces a new resource to be created. func (o ReferenceInputMssqlOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ReferenceInputMssql) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The fully qualified domain name of the MS SQL server. func (o ReferenceInputMssqlOutput) Server() pulumi.StringOutput { return o.ApplyT(func(v *ReferenceInputMssql) pulumi.StringOutput { return v.Server }).(pulumi.StringOutput) } // The name of the Stream Analytics Job. Changing this forces a new resource to be created. func (o ReferenceInputMssqlOutput) StreamAnalyticsJobName() pulumi.StringOutput { return o.ApplyT(func(v *ReferenceInputMssql) pulumi.StringOutput { return v.StreamAnalyticsJobName }).(pulumi.StringOutput) } // The name of the table in the Azure SQL database. func (o ReferenceInputMssqlOutput) Table() pulumi.StringPtrOutput { return o.ApplyT(func(v *ReferenceInputMssql) pulumi.StringPtrOutput { return v.Table }).(pulumi.StringPtrOutput) } // The username to connect to the MS SQL database. func (o ReferenceInputMssqlOutput) Username() pulumi.StringOutput { return o.ApplyT(func(v *ReferenceInputMssql) pulumi.StringOutput { return v.Username }).(pulumi.StringOutput) } type ReferenceInputMssqlArrayOutput struct{ *pulumi.OutputState } func (ReferenceInputMssqlArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ReferenceInputMssql)(nil)).Elem() } func (o ReferenceInputMssqlArrayOutput) ToReferenceInputMssqlArrayOutput() ReferenceInputMssqlArrayOutput { return o } func (o ReferenceInputMssqlArrayOutput) ToReferenceInputMssqlArrayOutputWithContext(ctx context.Context) ReferenceInputMssqlArrayOutput { return o } func (o ReferenceInputMssqlArrayOutput) Index(i pulumi.IntInput) ReferenceInputMssqlOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ReferenceInputMssql { return vs[0].([]*ReferenceInputMssql)[vs[1].(int)] }).(ReferenceInputMssqlOutput) } type ReferenceInputMssqlMapOutput struct{ *pulumi.OutputState } func (ReferenceInputMssqlMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ReferenceInputMssql)(nil)).Elem() } func (o ReferenceInputMssqlMapOutput) ToReferenceInputMssqlMapOutput() ReferenceInputMssqlMapOutput { return o } func (o ReferenceInputMssqlMapOutput) ToReferenceInputMssqlMapOutputWithContext(ctx context.Context) ReferenceInputMssqlMapOutput { return o } func (o ReferenceInputMssqlMapOutput) MapIndex(k pulumi.StringInput) ReferenceInputMssqlOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ReferenceInputMssql { return vs[0].(map[string]*ReferenceInputMssql)[vs[1].(string)] }).(ReferenceInputMssqlOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ReferenceInputMssqlInput)(nil)).Elem(), &ReferenceInputMssql{}) pulumi.RegisterInputType(reflect.TypeOf((*ReferenceInputMssqlArrayInput)(nil)).Elem(), ReferenceInputMssqlArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ReferenceInputMssqlMapInput)(nil)).Elem(), ReferenceInputMssqlMap{}) pulumi.RegisterOutputType(ReferenceInputMssqlOutput{}) pulumi.RegisterOutputType(ReferenceInputMssqlArrayOutput{}) pulumi.RegisterOutputType(ReferenceInputMssqlMapOutput{}) }
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/streamanalytics/managedPrivateEndpoint.go
sdk/go/azure/streamanalytics/managedPrivateEndpoint.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Managed Private Endpoint. // // ## 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("StorageV2"), // IsHnsEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleCluster, err := streamanalytics.NewCluster(ctx, "example", &streamanalytics.ClusterArgs{ // Name: pulumi.String("examplestreamanalyticscluster"), // ResourceGroupName: example.Name, // Location: example.Location, // StreamingCapacity: pulumi.Int(36), // }) // if err != nil { // return err // } // _, err = streamanalytics.NewManagedPrivateEndpoint(ctx, "example", &streamanalytics.ManagedPrivateEndpointArgs{ // Name: pulumi.String("exampleprivateendpoint"), // ResourceGroupName: example.Name, // StreamAnalyticsClusterName: exampleCluster.Name, // TargetResourceId: exampleAccount.ID(), // SubresourceName: pulumi.String("blob"), // }) // 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.StreamAnalytics` - 2020-03-01 // // ## Import // // Stream Analytics Private Endpoints can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/managedPrivateEndpoint:ManagedPrivateEndpoint example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.StreamAnalytics/clusters/cluster1/privateEndpoints/endpoint1 // ``` type ManagedPrivateEndpoint struct { pulumi.CustomResourceState // The name which should be used for this Stream Analytics Managed Private Endpoint. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the Stream Analytics Managed Private Endpoint should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The name of the Stream Analytics Cluster where the Managed Private Endpoint should be created. Changing this forces a new resource to be created. StreamAnalyticsClusterName pulumi.StringOutput `pulumi:"streamAnalyticsClusterName"` // Specifies the sub resource name which the Stream Analytics Private Endpoint is able to connect to. Changing this forces a new resource to be created. SubresourceName pulumi.StringOutput `pulumi:"subresourceName"` // The ID of the Private Link Enabled Remote Resource which this Stream Analytics Private endpoint should be connected to. Changing this forces a new resource to be created. TargetResourceId pulumi.StringOutput `pulumi:"targetResourceId"` } // NewManagedPrivateEndpoint registers a new resource with the given unique name, arguments, and options. func NewManagedPrivateEndpoint(ctx *pulumi.Context, name string, args *ManagedPrivateEndpointArgs, opts ...pulumi.ResourceOption) (*ManagedPrivateEndpoint, 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.StreamAnalyticsClusterName == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsClusterName'") } if args.SubresourceName == nil { return nil, errors.New("invalid value for required argument 'SubresourceName'") } if args.TargetResourceId == nil { return nil, errors.New("invalid value for required argument 'TargetResourceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ManagedPrivateEndpoint err := ctx.RegisterResource("azure:streamanalytics/managedPrivateEndpoint:ManagedPrivateEndpoint", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetManagedPrivateEndpoint gets an existing ManagedPrivateEndpoint 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 GetManagedPrivateEndpoint(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ManagedPrivateEndpointState, opts ...pulumi.ResourceOption) (*ManagedPrivateEndpoint, error) { var resource ManagedPrivateEndpoint err := ctx.ReadResource("azure:streamanalytics/managedPrivateEndpoint:ManagedPrivateEndpoint", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ManagedPrivateEndpoint resources. type managedPrivateEndpointState struct { // The name which should be used for this Stream Analytics Managed Private Endpoint. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Stream Analytics Managed Private Endpoint should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The name of the Stream Analytics Cluster where the Managed Private Endpoint should be created. Changing this forces a new resource to be created. StreamAnalyticsClusterName *string `pulumi:"streamAnalyticsClusterName"` // Specifies the sub resource name which the Stream Analytics Private Endpoint is able to connect to. Changing this forces a new resource to be created. SubresourceName *string `pulumi:"subresourceName"` // The ID of the Private Link Enabled Remote Resource which this Stream Analytics Private endpoint should be connected to. Changing this forces a new resource to be created. TargetResourceId *string `pulumi:"targetResourceId"` } type ManagedPrivateEndpointState struct { // The name which should be used for this Stream Analytics Managed Private Endpoint. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Managed Private Endpoint should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The name of the Stream Analytics Cluster where the Managed Private Endpoint should be created. Changing this forces a new resource to be created. StreamAnalyticsClusterName pulumi.StringPtrInput // Specifies the sub resource name which the Stream Analytics Private Endpoint is able to connect to. Changing this forces a new resource to be created. SubresourceName pulumi.StringPtrInput // The ID of the Private Link Enabled Remote Resource which this Stream Analytics Private endpoint should be connected to. Changing this forces a new resource to be created. TargetResourceId pulumi.StringPtrInput } func (ManagedPrivateEndpointState) ElementType() reflect.Type { return reflect.TypeOf((*managedPrivateEndpointState)(nil)).Elem() } type managedPrivateEndpointArgs struct { // The name which should be used for this Stream Analytics Managed Private Endpoint. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Stream Analytics Managed Private Endpoint should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The name of the Stream Analytics Cluster where the Managed Private Endpoint should be created. Changing this forces a new resource to be created. StreamAnalyticsClusterName string `pulumi:"streamAnalyticsClusterName"` // Specifies the sub resource name which the Stream Analytics Private Endpoint is able to connect to. Changing this forces a new resource to be created. SubresourceName string `pulumi:"subresourceName"` // The ID of the Private Link Enabled Remote Resource which this Stream Analytics Private endpoint should be connected to. Changing this forces a new resource to be created. TargetResourceId string `pulumi:"targetResourceId"` } // The set of arguments for constructing a ManagedPrivateEndpoint resource. type ManagedPrivateEndpointArgs struct { // The name which should be used for this Stream Analytics Managed Private Endpoint. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Managed Private Endpoint should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The name of the Stream Analytics Cluster where the Managed Private Endpoint should be created. Changing this forces a new resource to be created. StreamAnalyticsClusterName pulumi.StringInput // Specifies the sub resource name which the Stream Analytics Private Endpoint is able to connect to. Changing this forces a new resource to be created. SubresourceName pulumi.StringInput // The ID of the Private Link Enabled Remote Resource which this Stream Analytics Private endpoint should be connected to. Changing this forces a new resource to be created. TargetResourceId pulumi.StringInput } func (ManagedPrivateEndpointArgs) ElementType() reflect.Type { return reflect.TypeOf((*managedPrivateEndpointArgs)(nil)).Elem() } type ManagedPrivateEndpointInput interface { pulumi.Input ToManagedPrivateEndpointOutput() ManagedPrivateEndpointOutput ToManagedPrivateEndpointOutputWithContext(ctx context.Context) ManagedPrivateEndpointOutput } func (*ManagedPrivateEndpoint) ElementType() reflect.Type { return reflect.TypeOf((**ManagedPrivateEndpoint)(nil)).Elem() } func (i *ManagedPrivateEndpoint) ToManagedPrivateEndpointOutput() ManagedPrivateEndpointOutput { return i.ToManagedPrivateEndpointOutputWithContext(context.Background()) } func (i *ManagedPrivateEndpoint) ToManagedPrivateEndpointOutputWithContext(ctx context.Context) ManagedPrivateEndpointOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedPrivateEndpointOutput) } // ManagedPrivateEndpointArrayInput is an input type that accepts ManagedPrivateEndpointArray and ManagedPrivateEndpointArrayOutput values. // You can construct a concrete instance of `ManagedPrivateEndpointArrayInput` via: // // ManagedPrivateEndpointArray{ ManagedPrivateEndpointArgs{...} } type ManagedPrivateEndpointArrayInput interface { pulumi.Input ToManagedPrivateEndpointArrayOutput() ManagedPrivateEndpointArrayOutput ToManagedPrivateEndpointArrayOutputWithContext(context.Context) ManagedPrivateEndpointArrayOutput } type ManagedPrivateEndpointArray []ManagedPrivateEndpointInput func (ManagedPrivateEndpointArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedPrivateEndpoint)(nil)).Elem() } func (i ManagedPrivateEndpointArray) ToManagedPrivateEndpointArrayOutput() ManagedPrivateEndpointArrayOutput { return i.ToManagedPrivateEndpointArrayOutputWithContext(context.Background()) } func (i ManagedPrivateEndpointArray) ToManagedPrivateEndpointArrayOutputWithContext(ctx context.Context) ManagedPrivateEndpointArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedPrivateEndpointArrayOutput) } // ManagedPrivateEndpointMapInput is an input type that accepts ManagedPrivateEndpointMap and ManagedPrivateEndpointMapOutput values. // You can construct a concrete instance of `ManagedPrivateEndpointMapInput` via: // // ManagedPrivateEndpointMap{ "key": ManagedPrivateEndpointArgs{...} } type ManagedPrivateEndpointMapInput interface { pulumi.Input ToManagedPrivateEndpointMapOutput() ManagedPrivateEndpointMapOutput ToManagedPrivateEndpointMapOutputWithContext(context.Context) ManagedPrivateEndpointMapOutput } type ManagedPrivateEndpointMap map[string]ManagedPrivateEndpointInput func (ManagedPrivateEndpointMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedPrivateEndpoint)(nil)).Elem() } func (i ManagedPrivateEndpointMap) ToManagedPrivateEndpointMapOutput() ManagedPrivateEndpointMapOutput { return i.ToManagedPrivateEndpointMapOutputWithContext(context.Background()) } func (i ManagedPrivateEndpointMap) ToManagedPrivateEndpointMapOutputWithContext(ctx context.Context) ManagedPrivateEndpointMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedPrivateEndpointMapOutput) } type ManagedPrivateEndpointOutput struct{ *pulumi.OutputState } func (ManagedPrivateEndpointOutput) ElementType() reflect.Type { return reflect.TypeOf((**ManagedPrivateEndpoint)(nil)).Elem() } func (o ManagedPrivateEndpointOutput) ToManagedPrivateEndpointOutput() ManagedPrivateEndpointOutput { return o } func (o ManagedPrivateEndpointOutput) ToManagedPrivateEndpointOutputWithContext(ctx context.Context) ManagedPrivateEndpointOutput { return o } // The name which should be used for this Stream Analytics Managed Private Endpoint. Changing this forces a new resource to be created. func (o ManagedPrivateEndpointOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ManagedPrivateEndpoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the Stream Analytics Managed Private Endpoint should exist. Changing this forces a new resource to be created. func (o ManagedPrivateEndpointOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ManagedPrivateEndpoint) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The name of the Stream Analytics Cluster where the Managed Private Endpoint should be created. Changing this forces a new resource to be created. func (o ManagedPrivateEndpointOutput) StreamAnalyticsClusterName() pulumi.StringOutput { return o.ApplyT(func(v *ManagedPrivateEndpoint) pulumi.StringOutput { return v.StreamAnalyticsClusterName }).(pulumi.StringOutput) } // Specifies the sub resource name which the Stream Analytics Private Endpoint is able to connect to. Changing this forces a new resource to be created. func (o ManagedPrivateEndpointOutput) SubresourceName() pulumi.StringOutput { return o.ApplyT(func(v *ManagedPrivateEndpoint) pulumi.StringOutput { return v.SubresourceName }).(pulumi.StringOutput) } // The ID of the Private Link Enabled Remote Resource which this Stream Analytics Private endpoint should be connected to. Changing this forces a new resource to be created. func (o ManagedPrivateEndpointOutput) TargetResourceId() pulumi.StringOutput { return o.ApplyT(func(v *ManagedPrivateEndpoint) pulumi.StringOutput { return v.TargetResourceId }).(pulumi.StringOutput) } type ManagedPrivateEndpointArrayOutput struct{ *pulumi.OutputState } func (ManagedPrivateEndpointArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedPrivateEndpoint)(nil)).Elem() } func (o ManagedPrivateEndpointArrayOutput) ToManagedPrivateEndpointArrayOutput() ManagedPrivateEndpointArrayOutput { return o } func (o ManagedPrivateEndpointArrayOutput) ToManagedPrivateEndpointArrayOutputWithContext(ctx context.Context) ManagedPrivateEndpointArrayOutput { return o } func (o ManagedPrivateEndpointArrayOutput) Index(i pulumi.IntInput) ManagedPrivateEndpointOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagedPrivateEndpoint { return vs[0].([]*ManagedPrivateEndpoint)[vs[1].(int)] }).(ManagedPrivateEndpointOutput) } type ManagedPrivateEndpointMapOutput struct{ *pulumi.OutputState } func (ManagedPrivateEndpointMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedPrivateEndpoint)(nil)).Elem() } func (o ManagedPrivateEndpointMapOutput) ToManagedPrivateEndpointMapOutput() ManagedPrivateEndpointMapOutput { return o } func (o ManagedPrivateEndpointMapOutput) ToManagedPrivateEndpointMapOutputWithContext(ctx context.Context) ManagedPrivateEndpointMapOutput { return o } func (o ManagedPrivateEndpointMapOutput) MapIndex(k pulumi.StringInput) ManagedPrivateEndpointOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagedPrivateEndpoint { return vs[0].(map[string]*ManagedPrivateEndpoint)[vs[1].(string)] }).(ManagedPrivateEndpointOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ManagedPrivateEndpointInput)(nil)).Elem(), &ManagedPrivateEndpoint{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedPrivateEndpointArrayInput)(nil)).Elem(), ManagedPrivateEndpointArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedPrivateEndpointMapInput)(nil)).Elem(), ManagedPrivateEndpointMap{}) pulumi.RegisterOutputType(ManagedPrivateEndpointOutput{}) pulumi.RegisterOutputType(ManagedPrivateEndpointArrayOutput{}) pulumi.RegisterOutputType(ManagedPrivateEndpointMapOutput{}) }
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/streamanalytics/functionJavascriptUda.go
sdk/go/azure/streamanalytics/functionJavascriptUda.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a JavaScript UDA Function within a Stream Analytics Streaming Job. // // ## 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/streamanalytics" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.LookupResourceGroup(ctx, &core.LookupResourceGroupArgs{ // Name: "example-resources", // }, nil) // if err != nil { // return err // } // exampleGetJob, err := streamanalytics.LookupJob(ctx, &streamanalytics.LookupJobArgs{ // Name: "example-job", // ResourceGroupName: example.Name, // }, nil) // if err != nil { // return err // } // _, err = streamanalytics.NewFunctionJavascriptUda(ctx, "example", &streamanalytics.FunctionJavascriptUdaArgs{ // Name: pulumi.String("example-javascript-function"), // StreamAnalyticsJobId: pulumi.String(exampleGetJob.Id), // Script: pulumi.String(`function main() { // this.init = function () { // this.state = 0; // } // // this.accumulate = function (value, timestamp) { // this.state += value; // } // // this.computeResult = function () { // return this.state; // } // } // // `), // // Inputs: streamanalytics.FunctionJavascriptUdaInputTypeArray{ // &streamanalytics.FunctionJavascriptUdaInputTypeArgs{ // Type: pulumi.String("bigint"), // }, // }, // Output: &streamanalytics.FunctionJavascriptUdaOutputTypeArgs{ // Type: pulumi.String("bigint"), // }, // }) // 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.StreamAnalytics` - 2020-03-01 // // ## Import // // Stream Analytics JavaScript UDA Functions can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/functionJavascriptUda:FunctionJavascriptUda example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/functions/func1 // ``` type FunctionJavascriptUda struct { pulumi.CustomResourceState // One or more `input` blocks as defined below. Inputs FunctionJavascriptUdaInputTypeArrayOutput `pulumi:"inputs"` // The name of the JavaScript UDA Function. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // An `output` block as defined below. Output FunctionJavascriptUdaOutputTypeOutput `pulumi:"output"` // The JavaScript of this UDA Function. Script pulumi.StringOutput `pulumi:"script"` // The resource ID of the Stream Analytics Job where this Function should be created. Changing this forces a new resource to be created. StreamAnalyticsJobId pulumi.StringOutput `pulumi:"streamAnalyticsJobId"` } // NewFunctionJavascriptUda registers a new resource with the given unique name, arguments, and options. func NewFunctionJavascriptUda(ctx *pulumi.Context, name string, args *FunctionJavascriptUdaArgs, opts ...pulumi.ResourceOption) (*FunctionJavascriptUda, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Inputs == nil { return nil, errors.New("invalid value for required argument 'Inputs'") } if args.Output == nil { return nil, errors.New("invalid value for required argument 'Output'") } if args.Script == nil { return nil, errors.New("invalid value for required argument 'Script'") } if args.StreamAnalyticsJobId == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FunctionJavascriptUda err := ctx.RegisterResource("azure:streamanalytics/functionJavascriptUda:FunctionJavascriptUda", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFunctionJavascriptUda gets an existing FunctionJavascriptUda 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 GetFunctionJavascriptUda(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FunctionJavascriptUdaState, opts ...pulumi.ResourceOption) (*FunctionJavascriptUda, error) { var resource FunctionJavascriptUda err := ctx.ReadResource("azure:streamanalytics/functionJavascriptUda:FunctionJavascriptUda", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FunctionJavascriptUda resources. type functionJavascriptUdaState struct { // One or more `input` blocks as defined below. Inputs []FunctionJavascriptUdaInputType `pulumi:"inputs"` // The name of the JavaScript UDA Function. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // An `output` block as defined below. Output *FunctionJavascriptUdaOutputType `pulumi:"output"` // The JavaScript of this UDA Function. Script *string `pulumi:"script"` // The resource ID of the Stream Analytics Job where this Function should be created. Changing this forces a new resource to be created. StreamAnalyticsJobId *string `pulumi:"streamAnalyticsJobId"` } type FunctionJavascriptUdaState struct { // One or more `input` blocks as defined below. Inputs FunctionJavascriptUdaInputTypeArrayInput // The name of the JavaScript UDA Function. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // An `output` block as defined below. Output FunctionJavascriptUdaOutputTypePtrInput // The JavaScript of this UDA Function. Script pulumi.StringPtrInput // The resource ID of the Stream Analytics Job where this Function should be created. Changing this forces a new resource to be created. StreamAnalyticsJobId pulumi.StringPtrInput } func (FunctionJavascriptUdaState) ElementType() reflect.Type { return reflect.TypeOf((*functionJavascriptUdaState)(nil)).Elem() } type functionJavascriptUdaArgs struct { // One or more `input` blocks as defined below. Inputs []FunctionJavascriptUdaInputType `pulumi:"inputs"` // The name of the JavaScript UDA Function. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // An `output` block as defined below. Output FunctionJavascriptUdaOutputType `pulumi:"output"` // The JavaScript of this UDA Function. Script string `pulumi:"script"` // The resource ID of the Stream Analytics Job where this Function should be created. Changing this forces a new resource to be created. StreamAnalyticsJobId string `pulumi:"streamAnalyticsJobId"` } // The set of arguments for constructing a FunctionJavascriptUda resource. type FunctionJavascriptUdaArgs struct { // One or more `input` blocks as defined below. Inputs FunctionJavascriptUdaInputTypeArrayInput // The name of the JavaScript UDA Function. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // An `output` block as defined below. Output FunctionJavascriptUdaOutputTypeInput // The JavaScript of this UDA Function. Script pulumi.StringInput // The resource ID of the Stream Analytics Job where this Function should be created. Changing this forces a new resource to be created. StreamAnalyticsJobId pulumi.StringInput } func (FunctionJavascriptUdaArgs) ElementType() reflect.Type { return reflect.TypeOf((*functionJavascriptUdaArgs)(nil)).Elem() } type FunctionJavascriptUdaInput interface { pulumi.Input ToFunctionJavascriptUdaOutput() FunctionJavascriptUdaOutput ToFunctionJavascriptUdaOutputWithContext(ctx context.Context) FunctionJavascriptUdaOutput } func (*FunctionJavascriptUda) ElementType() reflect.Type { return reflect.TypeOf((**FunctionJavascriptUda)(nil)).Elem() } func (i *FunctionJavascriptUda) ToFunctionJavascriptUdaOutput() FunctionJavascriptUdaOutput { return i.ToFunctionJavascriptUdaOutputWithContext(context.Background()) } func (i *FunctionJavascriptUda) ToFunctionJavascriptUdaOutputWithContext(ctx context.Context) FunctionJavascriptUdaOutput { return pulumi.ToOutputWithContext(ctx, i).(FunctionJavascriptUdaOutput) } // FunctionJavascriptUdaArrayInput is an input type that accepts FunctionJavascriptUdaArray and FunctionJavascriptUdaArrayOutput values. // You can construct a concrete instance of `FunctionJavascriptUdaArrayInput` via: // // FunctionJavascriptUdaArray{ FunctionJavascriptUdaArgs{...} } type FunctionJavascriptUdaArrayInput interface { pulumi.Input ToFunctionJavascriptUdaArrayOutput() FunctionJavascriptUdaArrayOutput ToFunctionJavascriptUdaArrayOutputWithContext(context.Context) FunctionJavascriptUdaArrayOutput } type FunctionJavascriptUdaArray []FunctionJavascriptUdaInput func (FunctionJavascriptUdaArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FunctionJavascriptUda)(nil)).Elem() } func (i FunctionJavascriptUdaArray) ToFunctionJavascriptUdaArrayOutput() FunctionJavascriptUdaArrayOutput { return i.ToFunctionJavascriptUdaArrayOutputWithContext(context.Background()) } func (i FunctionJavascriptUdaArray) ToFunctionJavascriptUdaArrayOutputWithContext(ctx context.Context) FunctionJavascriptUdaArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FunctionJavascriptUdaArrayOutput) } // FunctionJavascriptUdaMapInput is an input type that accepts FunctionJavascriptUdaMap and FunctionJavascriptUdaMapOutput values. // You can construct a concrete instance of `FunctionJavascriptUdaMapInput` via: // // FunctionJavascriptUdaMap{ "key": FunctionJavascriptUdaArgs{...} } type FunctionJavascriptUdaMapInput interface { pulumi.Input ToFunctionJavascriptUdaMapOutput() FunctionJavascriptUdaMapOutput ToFunctionJavascriptUdaMapOutputWithContext(context.Context) FunctionJavascriptUdaMapOutput } type FunctionJavascriptUdaMap map[string]FunctionJavascriptUdaInput func (FunctionJavascriptUdaMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FunctionJavascriptUda)(nil)).Elem() } func (i FunctionJavascriptUdaMap) ToFunctionJavascriptUdaMapOutput() FunctionJavascriptUdaMapOutput { return i.ToFunctionJavascriptUdaMapOutputWithContext(context.Background()) } func (i FunctionJavascriptUdaMap) ToFunctionJavascriptUdaMapOutputWithContext(ctx context.Context) FunctionJavascriptUdaMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FunctionJavascriptUdaMapOutput) } type FunctionJavascriptUdaOutput struct{ *pulumi.OutputState } func (FunctionJavascriptUdaOutput) ElementType() reflect.Type { return reflect.TypeOf((**FunctionJavascriptUda)(nil)).Elem() } func (o FunctionJavascriptUdaOutput) ToFunctionJavascriptUdaOutput() FunctionJavascriptUdaOutput { return o } func (o FunctionJavascriptUdaOutput) ToFunctionJavascriptUdaOutputWithContext(ctx context.Context) FunctionJavascriptUdaOutput { return o } // One or more `input` blocks as defined below. func (o FunctionJavascriptUdaOutput) Inputs() FunctionJavascriptUdaInputTypeArrayOutput { return o.ApplyT(func(v *FunctionJavascriptUda) FunctionJavascriptUdaInputTypeArrayOutput { return v.Inputs }).(FunctionJavascriptUdaInputTypeArrayOutput) } // The name of the JavaScript UDA Function. Changing this forces a new resource to be created. func (o FunctionJavascriptUdaOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FunctionJavascriptUda) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // An `output` block as defined below. func (o FunctionJavascriptUdaOutput) Output() FunctionJavascriptUdaOutputTypeOutput { return o.ApplyT(func(v *FunctionJavascriptUda) FunctionJavascriptUdaOutputTypeOutput { return v.Output }).(FunctionJavascriptUdaOutputTypeOutput) } // The JavaScript of this UDA Function. func (o FunctionJavascriptUdaOutput) Script() pulumi.StringOutput { return o.ApplyT(func(v *FunctionJavascriptUda) pulumi.StringOutput { return v.Script }).(pulumi.StringOutput) } // The resource ID of the Stream Analytics Job where this Function should be created. Changing this forces a new resource to be created. func (o FunctionJavascriptUdaOutput) StreamAnalyticsJobId() pulumi.StringOutput { return o.ApplyT(func(v *FunctionJavascriptUda) pulumi.StringOutput { return v.StreamAnalyticsJobId }).(pulumi.StringOutput) } type FunctionJavascriptUdaArrayOutput struct{ *pulumi.OutputState } func (FunctionJavascriptUdaArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FunctionJavascriptUda)(nil)).Elem() } func (o FunctionJavascriptUdaArrayOutput) ToFunctionJavascriptUdaArrayOutput() FunctionJavascriptUdaArrayOutput { return o } func (o FunctionJavascriptUdaArrayOutput) ToFunctionJavascriptUdaArrayOutputWithContext(ctx context.Context) FunctionJavascriptUdaArrayOutput { return o } func (o FunctionJavascriptUdaArrayOutput) Index(i pulumi.IntInput) FunctionJavascriptUdaOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FunctionJavascriptUda { return vs[0].([]*FunctionJavascriptUda)[vs[1].(int)] }).(FunctionJavascriptUdaOutput) } type FunctionJavascriptUdaMapOutput struct{ *pulumi.OutputState } func (FunctionJavascriptUdaMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FunctionJavascriptUda)(nil)).Elem() } func (o FunctionJavascriptUdaMapOutput) ToFunctionJavascriptUdaMapOutput() FunctionJavascriptUdaMapOutput { return o } func (o FunctionJavascriptUdaMapOutput) ToFunctionJavascriptUdaMapOutputWithContext(ctx context.Context) FunctionJavascriptUdaMapOutput { return o } func (o FunctionJavascriptUdaMapOutput) MapIndex(k pulumi.StringInput) FunctionJavascriptUdaOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FunctionJavascriptUda { return vs[0].(map[string]*FunctionJavascriptUda)[vs[1].(string)] }).(FunctionJavascriptUdaOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FunctionJavascriptUdaInput)(nil)).Elem(), &FunctionJavascriptUda{}) pulumi.RegisterInputType(reflect.TypeOf((*FunctionJavascriptUdaArrayInput)(nil)).Elem(), FunctionJavascriptUdaArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FunctionJavascriptUdaMapInput)(nil)).Elem(), FunctionJavascriptUdaMap{}) pulumi.RegisterOutputType(FunctionJavascriptUdaOutput{}) pulumi.RegisterOutputType(FunctionJavascriptUdaArrayOutput{}) pulumi.RegisterOutputType(FunctionJavascriptUdaMapOutput{}) }
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/streamanalytics/streamInputEventHub.go
sdk/go/azure/streamanalytics/streamInputEventHub.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // > **Note:** This resource creates a Stream Input of type `Microsoft.ServiceBus/EventHub`, to create a Stream Input of type `Microsoft.EventHub/EventHub` please use the resource azurerm_stream_analytics_stream_input_eventhub_v2. // // Manages a Stream Analytics Stream Input EventHub. // // ## 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/eventhub" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "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 // } // example := streamanalytics.LookupJobOutput(ctx, streamanalytics.GetJobOutputArgs{ // Name: pulumi.String("example-job"), // ResourceGroupName: exampleResourceGroup.Name, // }, nil) // exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{ // Name: pulumi.String("example-namespace"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // Sku: pulumi.String("Standard"), // Capacity: pulumi.Int(1), // }) // if err != nil { // return err // } // exampleEventHub, err := eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{ // Name: pulumi.String("example-eventhub"), // NamespaceName: exampleEventHubNamespace.Name, // ResourceGroupName: exampleResourceGroup.Name, // PartitionCount: pulumi.Int(2), // MessageRetention: pulumi.Int(1), // }) // if err != nil { // return err // } // exampleConsumerGroup, err := eventhub.NewConsumerGroup(ctx, "example", &eventhub.ConsumerGroupArgs{ // Name: pulumi.String("example-consumergroup"), // NamespaceName: exampleEventHubNamespace.Name, // EventhubName: exampleEventHub.Name, // ResourceGroupName: exampleResourceGroup.Name, // }) // if err != nil { // return err // } // _, err = streamanalytics.NewStreamInputEventHub(ctx, "example", &streamanalytics.StreamInputEventHubArgs{ // Name: pulumi.String("eventhub-stream-input"), // StreamAnalyticsJobName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.Name, nil // }).(pulumi.StringPtrOutput)), // ResourceGroupName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.ResourceGroupName, nil // }).(pulumi.StringPtrOutput)), // EventhubConsumerGroupName: exampleConsumerGroup.Name, // EventhubName: exampleEventHub.Name, // ServicebusNamespace: exampleEventHubNamespace.Name, // SharedAccessPolicyKey: exampleEventHubNamespace.DefaultPrimaryKey, // SharedAccessPolicyName: pulumi.String("RootManageSharedAccessKey"), // Serialization: &streamanalytics.StreamInputEventHubSerializationArgs{ // Type: pulumi.String("Json"), // Encoding: pulumi.String("UTF8"), // }, // }) // 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.StreamAnalytics` - 2020-03-01 // // ## Import // // Stream Analytics Stream Input EventHub's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/streamInputEventHub:StreamInputEventHub example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/inputs/input1 // ``` type StreamInputEventHub struct { pulumi.CustomResourceState // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrOutput `pulumi:"authenticationMode"` // The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not set the input will use the Event Hub's default consumer group. EventhubConsumerGroupName pulumi.StringPtrOutput `pulumi:"eventhubConsumerGroupName"` // The name of the Event Hub. EventhubName pulumi.StringOutput `pulumi:"eventhubName"` // The name of the Stream Input EventHub. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The property the input Event Hub has been partitioned by. PartitionKey pulumi.StringPtrOutput `pulumi:"partitionKey"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization StreamInputEventHubSerializationOutput `pulumi:"serialization"` // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace pulumi.StringOutput `pulumi:"servicebusNamespace"` // The shared access policy key for the specified shared access policy. SharedAccessPolicyKey pulumi.StringPtrOutput `pulumi:"sharedAccessPolicyKey"` // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. SharedAccessPolicyName pulumi.StringPtrOutput `pulumi:"sharedAccessPolicyName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringOutput `pulumi:"streamAnalyticsJobName"` } // NewStreamInputEventHub registers a new resource with the given unique name, arguments, and options. func NewStreamInputEventHub(ctx *pulumi.Context, name string, args *StreamInputEventHubArgs, opts ...pulumi.ResourceOption) (*StreamInputEventHub, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.EventhubName == nil { return nil, errors.New("invalid value for required argument 'EventhubName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Serialization == nil { return nil, errors.New("invalid value for required argument 'Serialization'") } if args.ServicebusNamespace == nil { return nil, errors.New("invalid value for required argument 'ServicebusNamespace'") } if args.StreamAnalyticsJobName == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobName'") } if args.SharedAccessPolicyKey != nil { args.SharedAccessPolicyKey = pulumi.ToSecret(args.SharedAccessPolicyKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "sharedAccessPolicyKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource StreamInputEventHub err := ctx.RegisterResource("azure:streamanalytics/streamInputEventHub:StreamInputEventHub", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetStreamInputEventHub gets an existing StreamInputEventHub 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 GetStreamInputEventHub(ctx *pulumi.Context, name string, id pulumi.IDInput, state *StreamInputEventHubState, opts ...pulumi.ResourceOption) (*StreamInputEventHub, error) { var resource StreamInputEventHub err := ctx.ReadResource("azure:streamanalytics/streamInputEventHub:StreamInputEventHub", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering StreamInputEventHub resources. type streamInputEventHubState struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not set the input will use the Event Hub's default consumer group. EventhubConsumerGroupName *string `pulumi:"eventhubConsumerGroupName"` // The name of the Event Hub. EventhubName *string `pulumi:"eventhubName"` // The name of the Stream Input EventHub. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The property the input Event Hub has been partitioned by. PartitionKey *string `pulumi:"partitionKey"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization *StreamInputEventHubSerialization `pulumi:"serialization"` // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace *string `pulumi:"servicebusNamespace"` // The shared access policy key for the specified shared access policy. SharedAccessPolicyKey *string `pulumi:"sharedAccessPolicyKey"` // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. SharedAccessPolicyName *string `pulumi:"sharedAccessPolicyName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName *string `pulumi:"streamAnalyticsJobName"` } type StreamInputEventHubState struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not set the input will use the Event Hub's default consumer group. EventhubConsumerGroupName pulumi.StringPtrInput // The name of the Event Hub. EventhubName pulumi.StringPtrInput // The name of the Stream Input EventHub. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The property the input Event Hub has been partitioned by. PartitionKey pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `serialization` block as defined below. Serialization StreamInputEventHubSerializationPtrInput // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace pulumi.StringPtrInput // The shared access policy key for the specified shared access policy. SharedAccessPolicyKey pulumi.StringPtrInput // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. SharedAccessPolicyName pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringPtrInput } func (StreamInputEventHubState) ElementType() reflect.Type { return reflect.TypeOf((*streamInputEventHubState)(nil)).Elem() } type streamInputEventHubArgs struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not set the input will use the Event Hub's default consumer group. EventhubConsumerGroupName *string `pulumi:"eventhubConsumerGroupName"` // The name of the Event Hub. EventhubName string `pulumi:"eventhubName"` // The name of the Stream Input EventHub. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The property the input Event Hub has been partitioned by. PartitionKey *string `pulumi:"partitionKey"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization StreamInputEventHubSerialization `pulumi:"serialization"` // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace string `pulumi:"servicebusNamespace"` // The shared access policy key for the specified shared access policy. SharedAccessPolicyKey *string `pulumi:"sharedAccessPolicyKey"` // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. SharedAccessPolicyName *string `pulumi:"sharedAccessPolicyName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName string `pulumi:"streamAnalyticsJobName"` } // The set of arguments for constructing a StreamInputEventHub resource. type StreamInputEventHubArgs struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not set the input will use the Event Hub's default consumer group. EventhubConsumerGroupName pulumi.StringPtrInput // The name of the Event Hub. EventhubName pulumi.StringInput // The name of the Stream Input EventHub. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The property the input Event Hub has been partitioned by. PartitionKey pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A `serialization` block as defined below. Serialization StreamInputEventHubSerializationInput // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace pulumi.StringInput // The shared access policy key for the specified shared access policy. SharedAccessPolicyKey pulumi.StringPtrInput // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. SharedAccessPolicyName pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringInput } func (StreamInputEventHubArgs) ElementType() reflect.Type { return reflect.TypeOf((*streamInputEventHubArgs)(nil)).Elem() } type StreamInputEventHubInput interface { pulumi.Input ToStreamInputEventHubOutput() StreamInputEventHubOutput ToStreamInputEventHubOutputWithContext(ctx context.Context) StreamInputEventHubOutput } func (*StreamInputEventHub) ElementType() reflect.Type { return reflect.TypeOf((**StreamInputEventHub)(nil)).Elem() } func (i *StreamInputEventHub) ToStreamInputEventHubOutput() StreamInputEventHubOutput { return i.ToStreamInputEventHubOutputWithContext(context.Background()) } func (i *StreamInputEventHub) ToStreamInputEventHubOutputWithContext(ctx context.Context) StreamInputEventHubOutput { return pulumi.ToOutputWithContext(ctx, i).(StreamInputEventHubOutput) } // StreamInputEventHubArrayInput is an input type that accepts StreamInputEventHubArray and StreamInputEventHubArrayOutput values. // You can construct a concrete instance of `StreamInputEventHubArrayInput` via: // // StreamInputEventHubArray{ StreamInputEventHubArgs{...} } type StreamInputEventHubArrayInput interface { pulumi.Input ToStreamInputEventHubArrayOutput() StreamInputEventHubArrayOutput ToStreamInputEventHubArrayOutputWithContext(context.Context) StreamInputEventHubArrayOutput } type StreamInputEventHubArray []StreamInputEventHubInput func (StreamInputEventHubArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*StreamInputEventHub)(nil)).Elem() } func (i StreamInputEventHubArray) ToStreamInputEventHubArrayOutput() StreamInputEventHubArrayOutput { return i.ToStreamInputEventHubArrayOutputWithContext(context.Background()) } func (i StreamInputEventHubArray) ToStreamInputEventHubArrayOutputWithContext(ctx context.Context) StreamInputEventHubArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(StreamInputEventHubArrayOutput) } // StreamInputEventHubMapInput is an input type that accepts StreamInputEventHubMap and StreamInputEventHubMapOutput values. // You can construct a concrete instance of `StreamInputEventHubMapInput` via: // // StreamInputEventHubMap{ "key": StreamInputEventHubArgs{...} } type StreamInputEventHubMapInput interface { pulumi.Input ToStreamInputEventHubMapOutput() StreamInputEventHubMapOutput ToStreamInputEventHubMapOutputWithContext(context.Context) StreamInputEventHubMapOutput } type StreamInputEventHubMap map[string]StreamInputEventHubInput func (StreamInputEventHubMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*StreamInputEventHub)(nil)).Elem() } func (i StreamInputEventHubMap) ToStreamInputEventHubMapOutput() StreamInputEventHubMapOutput { return i.ToStreamInputEventHubMapOutputWithContext(context.Background()) } func (i StreamInputEventHubMap) ToStreamInputEventHubMapOutputWithContext(ctx context.Context) StreamInputEventHubMapOutput { return pulumi.ToOutputWithContext(ctx, i).(StreamInputEventHubMapOutput) } type StreamInputEventHubOutput struct{ *pulumi.OutputState } func (StreamInputEventHubOutput) ElementType() reflect.Type { return reflect.TypeOf((**StreamInputEventHub)(nil)).Elem() } func (o StreamInputEventHubOutput) ToStreamInputEventHubOutput() StreamInputEventHubOutput { return o } func (o StreamInputEventHubOutput) ToStreamInputEventHubOutputWithContext(ctx context.Context) StreamInputEventHubOutput { return o } // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. func (o StreamInputEventHubOutput) AuthenticationMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *StreamInputEventHub) pulumi.StringPtrOutput { return v.AuthenticationMode }).(pulumi.StringPtrOutput) } // The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not set the input will use the Event Hub's default consumer group. func (o StreamInputEventHubOutput) EventhubConsumerGroupName() pulumi.StringPtrOutput { return o.ApplyT(func(v *StreamInputEventHub) pulumi.StringPtrOutput { return v.EventhubConsumerGroupName }).(pulumi.StringPtrOutput) } // The name of the Event Hub. func (o StreamInputEventHubOutput) EventhubName() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputEventHub) pulumi.StringOutput { return v.EventhubName }).(pulumi.StringOutput) } // The name of the Stream Input EventHub. Changing this forces a new resource to be created. func (o StreamInputEventHubOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputEventHub) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The property the input Event Hub has been partitioned by. func (o StreamInputEventHubOutput) PartitionKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *StreamInputEventHub) pulumi.StringPtrOutput { return v.PartitionKey }).(pulumi.StringPtrOutput) } // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. func (o StreamInputEventHubOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputEventHub) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `serialization` block as defined below. func (o StreamInputEventHubOutput) Serialization() StreamInputEventHubSerializationOutput { return o.ApplyT(func(v *StreamInputEventHub) StreamInputEventHubSerializationOutput { return v.Serialization }).(StreamInputEventHubSerializationOutput) } // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. func (o StreamInputEventHubOutput) ServicebusNamespace() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputEventHub) pulumi.StringOutput { return v.ServicebusNamespace }).(pulumi.StringOutput) } // The shared access policy key for the specified shared access policy. func (o StreamInputEventHubOutput) SharedAccessPolicyKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *StreamInputEventHub) pulumi.StringPtrOutput { return v.SharedAccessPolicyKey }).(pulumi.StringPtrOutput) } // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. func (o StreamInputEventHubOutput) SharedAccessPolicyName() pulumi.StringPtrOutput { return o.ApplyT(func(v *StreamInputEventHub) pulumi.StringPtrOutput { return v.SharedAccessPolicyName }).(pulumi.StringPtrOutput) } // The name of the Stream Analytics Job. Changing this forces a new resource to be created. func (o StreamInputEventHubOutput) StreamAnalyticsJobName() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputEventHub) pulumi.StringOutput { return v.StreamAnalyticsJobName }).(pulumi.StringOutput) } type StreamInputEventHubArrayOutput struct{ *pulumi.OutputState } func (StreamInputEventHubArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*StreamInputEventHub)(nil)).Elem() } func (o StreamInputEventHubArrayOutput) ToStreamInputEventHubArrayOutput() StreamInputEventHubArrayOutput { return o } func (o StreamInputEventHubArrayOutput) ToStreamInputEventHubArrayOutputWithContext(ctx context.Context) StreamInputEventHubArrayOutput { return o } func (o StreamInputEventHubArrayOutput) Index(i pulumi.IntInput) StreamInputEventHubOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StreamInputEventHub { return vs[0].([]*StreamInputEventHub)[vs[1].(int)] }).(StreamInputEventHubOutput) } type StreamInputEventHubMapOutput struct{ *pulumi.OutputState } func (StreamInputEventHubMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*StreamInputEventHub)(nil)).Elem() } func (o StreamInputEventHubMapOutput) ToStreamInputEventHubMapOutput() StreamInputEventHubMapOutput { return o } func (o StreamInputEventHubMapOutput) ToStreamInputEventHubMapOutputWithContext(ctx context.Context) StreamInputEventHubMapOutput { return o } func (o StreamInputEventHubMapOutput) MapIndex(k pulumi.StringInput) StreamInputEventHubOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StreamInputEventHub { return vs[0].(map[string]*StreamInputEventHub)[vs[1].(string)] }).(StreamInputEventHubOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*StreamInputEventHubInput)(nil)).Elem(), &StreamInputEventHub{}) pulumi.RegisterInputType(reflect.TypeOf((*StreamInputEventHubArrayInput)(nil)).Elem(), StreamInputEventHubArray{}) pulumi.RegisterInputType(reflect.TypeOf((*StreamInputEventHubMapInput)(nil)).Elem(), StreamInputEventHubMap{}) pulumi.RegisterOutputType(StreamInputEventHubOutput{}) pulumi.RegisterOutputType(StreamInputEventHubArrayOutput{}) pulumi.RegisterOutputType(StreamInputEventHubMapOutput{}) }
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/streamanalytics/cluster.go
sdk/go/azure/streamanalytics/cluster.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Cluster. // // ## 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/streamanalytics" // "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 = streamanalytics.NewCluster(ctx, "example", &streamanalytics.ClusterArgs{ // Name: pulumi.String("examplestreamanalyticscluster"), // ResourceGroupName: example.Name, // Location: example.Location, // StreamingCapacity: pulumi.Int(36), // }) // 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.StreamAnalytics` - 2020-03-01 // // ## Import // // Stream Analytics Clusters can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/cluster:Cluster example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.StreamAnalytics/clusters/cluster1 // ``` type Cluster struct { pulumi.CustomResourceState // The Azure Region where the Stream Analytics Cluster should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Stream Analytics Cluster. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the Stream Analytics Cluster should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The number of streaming units supported by the Cluster. Accepted values are multiples of `36` in the range of `36` to `216`. StreamingCapacity pulumi.IntOutput `pulumi:"streamingCapacity"` // A mapping of tags which should be assigned to the Stream Analytics. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewCluster registers a new resource with the given unique name, arguments, and options. func NewCluster(ctx *pulumi.Context, name string, args *ClusterArgs, opts ...pulumi.ResourceOption) (*Cluster, 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.StreamingCapacity == nil { return nil, errors.New("invalid value for required argument 'StreamingCapacity'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Cluster err := ctx.RegisterResource("azure:streamanalytics/cluster:Cluster", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetCluster gets an existing Cluster 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 GetCluster(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ClusterState, opts ...pulumi.ResourceOption) (*Cluster, error) { var resource Cluster err := ctx.ReadResource("azure:streamanalytics/cluster:Cluster", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Cluster resources. type clusterState struct { // The Azure Region where the Stream Analytics Cluster should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name which should be used for this Stream Analytics Cluster. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Stream Analytics Cluster should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The number of streaming units supported by the Cluster. Accepted values are multiples of `36` in the range of `36` to `216`. StreamingCapacity *int `pulumi:"streamingCapacity"` // A mapping of tags which should be assigned to the Stream Analytics. Tags map[string]string `pulumi:"tags"` } type ClusterState struct { // The Azure Region where the Stream Analytics Cluster should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name which should be used for this Stream Analytics Cluster. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Cluster should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The number of streaming units supported by the Cluster. Accepted values are multiples of `36` in the range of `36` to `216`. StreamingCapacity pulumi.IntPtrInput // A mapping of tags which should be assigned to the Stream Analytics. Tags pulumi.StringMapInput } func (ClusterState) ElementType() reflect.Type { return reflect.TypeOf((*clusterState)(nil)).Elem() } type clusterArgs struct { // The Azure Region where the Stream Analytics Cluster should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name which should be used for this Stream Analytics Cluster. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Stream Analytics Cluster should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The number of streaming units supported by the Cluster. Accepted values are multiples of `36` in the range of `36` to `216`. StreamingCapacity int `pulumi:"streamingCapacity"` // A mapping of tags which should be assigned to the Stream Analytics. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Cluster resource. type ClusterArgs struct { // The Azure Region where the Stream Analytics Cluster should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name which should be used for this Stream Analytics Cluster. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Cluster should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The number of streaming units supported by the Cluster. Accepted values are multiples of `36` in the range of `36` to `216`. StreamingCapacity pulumi.IntInput // A mapping of tags which should be assigned to the Stream Analytics. Tags pulumi.StringMapInput } func (ClusterArgs) ElementType() reflect.Type { return reflect.TypeOf((*clusterArgs)(nil)).Elem() } type ClusterInput interface { pulumi.Input ToClusterOutput() ClusterOutput ToClusterOutputWithContext(ctx context.Context) ClusterOutput } func (*Cluster) ElementType() reflect.Type { return reflect.TypeOf((**Cluster)(nil)).Elem() } func (i *Cluster) ToClusterOutput() ClusterOutput { return i.ToClusterOutputWithContext(context.Background()) } func (i *Cluster) ToClusterOutputWithContext(ctx context.Context) ClusterOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterOutput) } // ClusterArrayInput is an input type that accepts ClusterArray and ClusterArrayOutput values. // You can construct a concrete instance of `ClusterArrayInput` via: // // ClusterArray{ ClusterArgs{...} } type ClusterArrayInput interface { pulumi.Input ToClusterArrayOutput() ClusterArrayOutput ToClusterArrayOutputWithContext(context.Context) ClusterArrayOutput } type ClusterArray []ClusterInput func (ClusterArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Cluster)(nil)).Elem() } func (i ClusterArray) ToClusterArrayOutput() ClusterArrayOutput { return i.ToClusterArrayOutputWithContext(context.Background()) } func (i ClusterArray) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterArrayOutput) } // ClusterMapInput is an input type that accepts ClusterMap and ClusterMapOutput values. // You can construct a concrete instance of `ClusterMapInput` via: // // ClusterMap{ "key": ClusterArgs{...} } type ClusterMapInput interface { pulumi.Input ToClusterMapOutput() ClusterMapOutput ToClusterMapOutputWithContext(context.Context) ClusterMapOutput } type ClusterMap map[string]ClusterInput func (ClusterMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Cluster)(nil)).Elem() } func (i ClusterMap) ToClusterMapOutput() ClusterMapOutput { return i.ToClusterMapOutputWithContext(context.Background()) } func (i ClusterMap) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterMapOutput) } type ClusterOutput struct{ *pulumi.OutputState } func (ClusterOutput) ElementType() reflect.Type { return reflect.TypeOf((**Cluster)(nil)).Elem() } func (o ClusterOutput) ToClusterOutput() ClusterOutput { return o } func (o ClusterOutput) ToClusterOutputWithContext(ctx context.Context) ClusterOutput { return o } // The Azure Region where the Stream Analytics Cluster should exist. Changing this forces a new resource to be created. func (o ClusterOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Stream Analytics Cluster. Changing this forces a new resource to be created. func (o ClusterOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the Stream Analytics Cluster should exist. Changing this forces a new resource to be created. func (o ClusterOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The number of streaming units supported by the Cluster. Accepted values are multiples of `36` in the range of `36` to `216`. func (o ClusterOutput) StreamingCapacity() pulumi.IntOutput { return o.ApplyT(func(v *Cluster) pulumi.IntOutput { return v.StreamingCapacity }).(pulumi.IntOutput) } // A mapping of tags which should be assigned to the Stream Analytics. func (o ClusterOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Cluster) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type ClusterArrayOutput struct{ *pulumi.OutputState } func (ClusterArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Cluster)(nil)).Elem() } func (o ClusterArrayOutput) ToClusterArrayOutput() ClusterArrayOutput { return o } func (o ClusterArrayOutput) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput { return o } func (o ClusterArrayOutput) Index(i pulumi.IntInput) ClusterOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Cluster { return vs[0].([]*Cluster)[vs[1].(int)] }).(ClusterOutput) } type ClusterMapOutput struct{ *pulumi.OutputState } func (ClusterMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Cluster)(nil)).Elem() } func (o ClusterMapOutput) ToClusterMapOutput() ClusterMapOutput { return o } func (o ClusterMapOutput) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput { return o } func (o ClusterMapOutput) MapIndex(k pulumi.StringInput) ClusterOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Cluster { return vs[0].(map[string]*Cluster)[vs[1].(string)] }).(ClusterOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ClusterInput)(nil)).Elem(), &Cluster{}) pulumi.RegisterInputType(reflect.TypeOf((*ClusterArrayInput)(nil)).Elem(), ClusterArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ClusterMapInput)(nil)).Elem(), ClusterMap{}) pulumi.RegisterOutputType(ClusterOutput{}) pulumi.RegisterOutputType(ClusterArrayOutput{}) pulumi.RegisterOutputType(ClusterMapOutput{}) }
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/streamanalytics/outputSynapse.go
sdk/go/azure/streamanalytics/outputSynapse.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Output to an Azure Synapse Analytics 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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("rg-example"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // example := streamanalytics.LookupJobOutput(ctx, streamanalytics.GetJobOutputArgs{ // Name: pulumi.String("example-job"), // ResourceGroupName: exampleResourceGroup.Name, // }, nil) // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("StorageV2"), // IsHnsEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // _, err = streamanalytics.NewOutputSynapse(ctx, "example", &streamanalytics.OutputSynapseArgs{ // Name: pulumi.String("example-output-synapse"), // StreamAnalyticsJobName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.Name, nil // }).(pulumi.StringPtrOutput)), // ResourceGroupName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.ResourceGroupName, nil // }).(pulumi.StringPtrOutput)), // Server: exampleWorkspace.ConnectivityEndpoints.ApplyT(func(connectivityEndpoints map[string]string) (string, error) { // return connectivityEndpoints.SqlOnDemand, nil // }).(pulumi.StringOutput), // User: exampleWorkspace.SqlAdministratorLogin, // Password: exampleWorkspace.SqlAdministratorLoginPassword, // Database: pulumi.String("master"), // Table: pulumi.String("ExampleTable"), // }) // 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.StreamAnalytics` - 2021-10-01-preview // // ## Import // // A Stream Analytics Output to an Azure Synapse Analytics Workspace can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/outputSynapse:OutputSynapse example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/outputs/output1 // ``` type OutputSynapse struct { pulumi.CustomResourceState // The name of the Azure SQL database. Changing this forces a new resource to be created. Database pulumi.StringOutput `pulumi:"database"` // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The password that will be used to connect to the Azure SQL database. Password pulumi.StringOutput `pulumi:"password"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The name of the SQL server containing the Azure SQL database. Changing this forces a new resource to be created. Server pulumi.StringOutput `pulumi:"server"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringOutput `pulumi:"streamAnalyticsJobName"` // The name of the table in the Azure SQL database. Changing this forces a new resource to be created. Table pulumi.StringOutput `pulumi:"table"` // The user name that will be used to connect to the Azure SQL database. Changing this forces a new resource to be created. User pulumi.StringOutput `pulumi:"user"` } // NewOutputSynapse registers a new resource with the given unique name, arguments, and options. func NewOutputSynapse(ctx *pulumi.Context, name string, args *OutputSynapseArgs, opts ...pulumi.ResourceOption) (*OutputSynapse, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Database == nil { return nil, errors.New("invalid value for required argument 'Database'") } if args.Password == nil { return nil, errors.New("invalid value for required argument 'Password'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Server == nil { return nil, errors.New("invalid value for required argument 'Server'") } if args.StreamAnalyticsJobName == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobName'") } if args.Table == nil { return nil, errors.New("invalid value for required argument 'Table'") } if args.User == nil { return nil, errors.New("invalid value for required argument 'User'") } if args.Password != nil { args.Password = pulumi.ToSecret(args.Password).(pulumi.StringInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "password", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource OutputSynapse err := ctx.RegisterResource("azure:streamanalytics/outputSynapse:OutputSynapse", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetOutputSynapse gets an existing OutputSynapse 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 GetOutputSynapse(ctx *pulumi.Context, name string, id pulumi.IDInput, state *OutputSynapseState, opts ...pulumi.ResourceOption) (*OutputSynapse, error) { var resource OutputSynapse err := ctx.ReadResource("azure:streamanalytics/outputSynapse:OutputSynapse", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering OutputSynapse resources. type outputSynapseState struct { // The name of the Azure SQL database. Changing this forces a new resource to be created. Database *string `pulumi:"database"` // The name of the Stream Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The password that will be used to connect to the Azure SQL database. Password *string `pulumi:"password"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The name of the SQL server containing the Azure SQL database. Changing this forces a new resource to be created. Server *string `pulumi:"server"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName *string `pulumi:"streamAnalyticsJobName"` // The name of the table in the Azure SQL database. Changing this forces a new resource to be created. Table *string `pulumi:"table"` // The user name that will be used to connect to the Azure SQL database. Changing this forces a new resource to be created. User *string `pulumi:"user"` } type OutputSynapseState struct { // The name of the Azure SQL database. Changing this forces a new resource to be created. Database pulumi.StringPtrInput // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The password that will be used to connect to the Azure SQL database. Password pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The name of the SQL server containing the Azure SQL database. Changing this forces a new resource to be created. Server pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringPtrInput // The name of the table in the Azure SQL database. Changing this forces a new resource to be created. Table pulumi.StringPtrInput // The user name that will be used to connect to the Azure SQL database. Changing this forces a new resource to be created. User pulumi.StringPtrInput } func (OutputSynapseState) ElementType() reflect.Type { return reflect.TypeOf((*outputSynapseState)(nil)).Elem() } type outputSynapseArgs struct { // The name of the Azure SQL database. Changing this forces a new resource to be created. Database string `pulumi:"database"` // The name of the Stream Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The password that will be used to connect to the Azure SQL database. Password string `pulumi:"password"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The name of the SQL server containing the Azure SQL database. Changing this forces a new resource to be created. Server string `pulumi:"server"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName string `pulumi:"streamAnalyticsJobName"` // The name of the table in the Azure SQL database. Changing this forces a new resource to be created. Table string `pulumi:"table"` // The user name that will be used to connect to the Azure SQL database. Changing this forces a new resource to be created. User string `pulumi:"user"` } // The set of arguments for constructing a OutputSynapse resource. type OutputSynapseArgs struct { // The name of the Azure SQL database. Changing this forces a new resource to be created. Database pulumi.StringInput // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The password that will be used to connect to the Azure SQL database. Password pulumi.StringInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The name of the SQL server containing the Azure SQL database. Changing this forces a new resource to be created. Server pulumi.StringInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringInput // The name of the table in the Azure SQL database. Changing this forces a new resource to be created. Table pulumi.StringInput // The user name that will be used to connect to the Azure SQL database. Changing this forces a new resource to be created. User pulumi.StringInput } func (OutputSynapseArgs) ElementType() reflect.Type { return reflect.TypeOf((*outputSynapseArgs)(nil)).Elem() } type OutputSynapseInput interface { pulumi.Input ToOutputSynapseOutput() OutputSynapseOutput ToOutputSynapseOutputWithContext(ctx context.Context) OutputSynapseOutput } func (*OutputSynapse) ElementType() reflect.Type { return reflect.TypeOf((**OutputSynapse)(nil)).Elem() } func (i *OutputSynapse) ToOutputSynapseOutput() OutputSynapseOutput { return i.ToOutputSynapseOutputWithContext(context.Background()) } func (i *OutputSynapse) ToOutputSynapseOutputWithContext(ctx context.Context) OutputSynapseOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputSynapseOutput) } // OutputSynapseArrayInput is an input type that accepts OutputSynapseArray and OutputSynapseArrayOutput values. // You can construct a concrete instance of `OutputSynapseArrayInput` via: // // OutputSynapseArray{ OutputSynapseArgs{...} } type OutputSynapseArrayInput interface { pulumi.Input ToOutputSynapseArrayOutput() OutputSynapseArrayOutput ToOutputSynapseArrayOutputWithContext(context.Context) OutputSynapseArrayOutput } type OutputSynapseArray []OutputSynapseInput func (OutputSynapseArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputSynapse)(nil)).Elem() } func (i OutputSynapseArray) ToOutputSynapseArrayOutput() OutputSynapseArrayOutput { return i.ToOutputSynapseArrayOutputWithContext(context.Background()) } func (i OutputSynapseArray) ToOutputSynapseArrayOutputWithContext(ctx context.Context) OutputSynapseArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputSynapseArrayOutput) } // OutputSynapseMapInput is an input type that accepts OutputSynapseMap and OutputSynapseMapOutput values. // You can construct a concrete instance of `OutputSynapseMapInput` via: // // OutputSynapseMap{ "key": OutputSynapseArgs{...} } type OutputSynapseMapInput interface { pulumi.Input ToOutputSynapseMapOutput() OutputSynapseMapOutput ToOutputSynapseMapOutputWithContext(context.Context) OutputSynapseMapOutput } type OutputSynapseMap map[string]OutputSynapseInput func (OutputSynapseMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputSynapse)(nil)).Elem() } func (i OutputSynapseMap) ToOutputSynapseMapOutput() OutputSynapseMapOutput { return i.ToOutputSynapseMapOutputWithContext(context.Background()) } func (i OutputSynapseMap) ToOutputSynapseMapOutputWithContext(ctx context.Context) OutputSynapseMapOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputSynapseMapOutput) } type OutputSynapseOutput struct{ *pulumi.OutputState } func (OutputSynapseOutput) ElementType() reflect.Type { return reflect.TypeOf((**OutputSynapse)(nil)).Elem() } func (o OutputSynapseOutput) ToOutputSynapseOutput() OutputSynapseOutput { return o } func (o OutputSynapseOutput) ToOutputSynapseOutputWithContext(ctx context.Context) OutputSynapseOutput { return o } // The name of the Azure SQL database. Changing this forces a new resource to be created. func (o OutputSynapseOutput) Database() pulumi.StringOutput { return o.ApplyT(func(v *OutputSynapse) pulumi.StringOutput { return v.Database }).(pulumi.StringOutput) } // The name of the Stream Output. Changing this forces a new resource to be created. func (o OutputSynapseOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *OutputSynapse) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The password that will be used to connect to the Azure SQL database. func (o OutputSynapseOutput) Password() pulumi.StringOutput { return o.ApplyT(func(v *OutputSynapse) pulumi.StringOutput { return v.Password }).(pulumi.StringOutput) } // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. func (o OutputSynapseOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *OutputSynapse) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The name of the SQL server containing the Azure SQL database. Changing this forces a new resource to be created. func (o OutputSynapseOutput) Server() pulumi.StringOutput { return o.ApplyT(func(v *OutputSynapse) pulumi.StringOutput { return v.Server }).(pulumi.StringOutput) } // The name of the Stream Analytics Job. Changing this forces a new resource to be created. func (o OutputSynapseOutput) StreamAnalyticsJobName() pulumi.StringOutput { return o.ApplyT(func(v *OutputSynapse) pulumi.StringOutput { return v.StreamAnalyticsJobName }).(pulumi.StringOutput) } // The name of the table in the Azure SQL database. Changing this forces a new resource to be created. func (o OutputSynapseOutput) Table() pulumi.StringOutput { return o.ApplyT(func(v *OutputSynapse) pulumi.StringOutput { return v.Table }).(pulumi.StringOutput) } // The user name that will be used to connect to the Azure SQL database. Changing this forces a new resource to be created. func (o OutputSynapseOutput) User() pulumi.StringOutput { return o.ApplyT(func(v *OutputSynapse) pulumi.StringOutput { return v.User }).(pulumi.StringOutput) } type OutputSynapseArrayOutput struct{ *pulumi.OutputState } func (OutputSynapseArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputSynapse)(nil)).Elem() } func (o OutputSynapseArrayOutput) ToOutputSynapseArrayOutput() OutputSynapseArrayOutput { return o } func (o OutputSynapseArrayOutput) ToOutputSynapseArrayOutputWithContext(ctx context.Context) OutputSynapseArrayOutput { return o } func (o OutputSynapseArrayOutput) Index(i pulumi.IntInput) OutputSynapseOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *OutputSynapse { return vs[0].([]*OutputSynapse)[vs[1].(int)] }).(OutputSynapseOutput) } type OutputSynapseMapOutput struct{ *pulumi.OutputState } func (OutputSynapseMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputSynapse)(nil)).Elem() } func (o OutputSynapseMapOutput) ToOutputSynapseMapOutput() OutputSynapseMapOutput { return o } func (o OutputSynapseMapOutput) ToOutputSynapseMapOutputWithContext(ctx context.Context) OutputSynapseMapOutput { return o } func (o OutputSynapseMapOutput) MapIndex(k pulumi.StringInput) OutputSynapseOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *OutputSynapse { return vs[0].(map[string]*OutputSynapse)[vs[1].(string)] }).(OutputSynapseOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*OutputSynapseInput)(nil)).Elem(), &OutputSynapse{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputSynapseArrayInput)(nil)).Elem(), OutputSynapseArray{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputSynapseMapInput)(nil)).Elem(), OutputSynapseMap{}) pulumi.RegisterOutputType(OutputSynapseOutput{}) pulumi.RegisterOutputType(OutputSynapseArrayOutput{}) pulumi.RegisterOutputType(OutputSynapseMapOutput{}) }
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/streamanalytics/outputCosmosdb.go
sdk/go/azure/streamanalytics/outputCosmosdb.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Output to CosmosDB. // // ## 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/cosmosdb" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "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("rg-example"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // example := streamanalytics.LookupJobOutput(ctx, streamanalytics.GetJobOutputArgs{ // Name: pulumi.String("example-job"), // ResourceGroupName: exampleResourceGroup.Name, // }, nil) // exampleAccount, err := cosmosdb.NewAccount(ctx, "example", &cosmosdb.AccountArgs{ // Name: pulumi.String("exampledb"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // OfferType: pulumi.String("Standard"), // Kind: pulumi.String("GlobalDocumentDB"), // ConsistencyPolicy: &cosmosdb.AccountConsistencyPolicyArgs{ // ConsistencyLevel: pulumi.String("BoundedStaleness"), // MaxIntervalInSeconds: pulumi.Int(10), // MaxStalenessPrefix: pulumi.Int(200), // }, // GeoLocations: cosmosdb.AccountGeoLocationArray{ // &cosmosdb.AccountGeoLocationArgs{ // Location: exampleResourceGroup.Location, // FailoverPriority: pulumi.Int(0), // }, // }, // }) // if err != nil { // return err // } // exampleSqlDatabase, err := cosmosdb.NewSqlDatabase(ctx, "example", &cosmosdb.SqlDatabaseArgs{ // Name: pulumi.String("cosmos-sql-db"), // ResourceGroupName: exampleAccount.ResourceGroupName, // AccountName: exampleAccount.Name, // Throughput: pulumi.Int(400), // }) // if err != nil { // return err // } // exampleSqlContainer, err := cosmosdb.NewSqlContainer(ctx, "example", &cosmosdb.SqlContainerArgs{ // Name: pulumi.String("examplecontainer"), // ResourceGroupName: exampleAccount.ResourceGroupName, // AccountName: exampleAccount.Name, // DatabaseName: exampleSqlDatabase.Name, // PartitionKeyPath: "foo", // }) // if err != nil { // return err // } // _, err = streamanalytics.NewOutputCosmosdb(ctx, "example", &streamanalytics.OutputCosmosdbArgs{ // Name: pulumi.String("output-to-cosmosdb"), // StreamAnalyticsJobId: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.Id, nil // }).(pulumi.StringPtrOutput)), // CosmosdbAccountKey: exampleAccount.PrimaryKey, // CosmosdbSqlDatabaseId: exampleSqlDatabase.ID(), // ContainerName: exampleSqlContainer.Name, // DocumentId: pulumi.String("exampledocumentid"), // }) // 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.StreamAnalytics` - 2021-10-01-preview // // ## Import // // Stream Analytics Outputs for CosmosDB can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/outputCosmosdb:OutputCosmosdb example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/outputs/output1 // ``` type OutputCosmosdb struct { pulumi.CustomResourceState // The authentication mode for the CosmosDB database. Possible values are `ConnectionString` and `Msi`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrOutput `pulumi:"authenticationMode"` // The name of the CosmosDB container. ContainerName pulumi.StringOutput `pulumi:"containerName"` // The account key for the CosmosDB database. CosmosdbAccountKey pulumi.StringOutput `pulumi:"cosmosdbAccountKey"` // The ID of the CosmosDB database. CosmosdbSqlDatabaseId pulumi.StringOutput `pulumi:"cosmosdbSqlDatabaseId"` // The name of the field in output events used to specify the primary key which insert or update operations are based on. DocumentId pulumi.StringPtrOutput `pulumi:"documentId"` // The name of the Stream Analytics Output. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the field in output events used to specify the key for partitioning output across collections. If `containerName` contains `{partition}` token, this property is required to be specified. PartitionKey pulumi.StringPtrOutput `pulumi:"partitionKey"` // The ID of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId pulumi.StringOutput `pulumi:"streamAnalyticsJobId"` } // NewOutputCosmosdb registers a new resource with the given unique name, arguments, and options. func NewOutputCosmosdb(ctx *pulumi.Context, name string, args *OutputCosmosdbArgs, opts ...pulumi.ResourceOption) (*OutputCosmosdb, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ContainerName == nil { return nil, errors.New("invalid value for required argument 'ContainerName'") } if args.CosmosdbAccountKey == nil { return nil, errors.New("invalid value for required argument 'CosmosdbAccountKey'") } if args.CosmosdbSqlDatabaseId == nil { return nil, errors.New("invalid value for required argument 'CosmosdbSqlDatabaseId'") } if args.StreamAnalyticsJobId == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobId'") } if args.CosmosdbAccountKey != nil { args.CosmosdbAccountKey = pulumi.ToSecret(args.CosmosdbAccountKey).(pulumi.StringInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "cosmosdbAccountKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource OutputCosmosdb err := ctx.RegisterResource("azure:streamanalytics/outputCosmosdb:OutputCosmosdb", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetOutputCosmosdb gets an existing OutputCosmosdb 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 GetOutputCosmosdb(ctx *pulumi.Context, name string, id pulumi.IDInput, state *OutputCosmosdbState, opts ...pulumi.ResourceOption) (*OutputCosmosdb, error) { var resource OutputCosmosdb err := ctx.ReadResource("azure:streamanalytics/outputCosmosdb:OutputCosmosdb", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering OutputCosmosdb resources. type outputCosmosdbState struct { // The authentication mode for the CosmosDB database. Possible values are `ConnectionString` and `Msi`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The name of the CosmosDB container. ContainerName *string `pulumi:"containerName"` // The account key for the CosmosDB database. CosmosdbAccountKey *string `pulumi:"cosmosdbAccountKey"` // The ID of the CosmosDB database. CosmosdbSqlDatabaseId *string `pulumi:"cosmosdbSqlDatabaseId"` // The name of the field in output events used to specify the primary key which insert or update operations are based on. DocumentId *string `pulumi:"documentId"` // The name of the Stream Analytics Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the field in output events used to specify the key for partitioning output across collections. If `containerName` contains `{partition}` token, this property is required to be specified. PartitionKey *string `pulumi:"partitionKey"` // The ID of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId *string `pulumi:"streamAnalyticsJobId"` } type OutputCosmosdbState struct { // The authentication mode for the CosmosDB database. Possible values are `ConnectionString` and `Msi`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The name of the CosmosDB container. ContainerName pulumi.StringPtrInput // The account key for the CosmosDB database. CosmosdbAccountKey pulumi.StringPtrInput // The ID of the CosmosDB database. CosmosdbSqlDatabaseId pulumi.StringPtrInput // The name of the field in output events used to specify the primary key which insert or update operations are based on. DocumentId pulumi.StringPtrInput // The name of the Stream Analytics Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the field in output events used to specify the key for partitioning output across collections. If `containerName` contains `{partition}` token, this property is required to be specified. PartitionKey pulumi.StringPtrInput // The ID of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId pulumi.StringPtrInput } func (OutputCosmosdbState) ElementType() reflect.Type { return reflect.TypeOf((*outputCosmosdbState)(nil)).Elem() } type outputCosmosdbArgs struct { // The authentication mode for the CosmosDB database. Possible values are `ConnectionString` and `Msi`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The name of the CosmosDB container. ContainerName string `pulumi:"containerName"` // The account key for the CosmosDB database. CosmosdbAccountKey string `pulumi:"cosmosdbAccountKey"` // The ID of the CosmosDB database. CosmosdbSqlDatabaseId string `pulumi:"cosmosdbSqlDatabaseId"` // The name of the field in output events used to specify the primary key which insert or update operations are based on. DocumentId *string `pulumi:"documentId"` // The name of the Stream Analytics Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the field in output events used to specify the key for partitioning output across collections. If `containerName` contains `{partition}` token, this property is required to be specified. PartitionKey *string `pulumi:"partitionKey"` // The ID of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId string `pulumi:"streamAnalyticsJobId"` } // The set of arguments for constructing a OutputCosmosdb resource. type OutputCosmosdbArgs struct { // The authentication mode for the CosmosDB database. Possible values are `ConnectionString` and `Msi`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The name of the CosmosDB container. ContainerName pulumi.StringInput // The account key for the CosmosDB database. CosmosdbAccountKey pulumi.StringInput // The ID of the CosmosDB database. CosmosdbSqlDatabaseId pulumi.StringInput // The name of the field in output events used to specify the primary key which insert or update operations are based on. DocumentId pulumi.StringPtrInput // The name of the Stream Analytics Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the field in output events used to specify the key for partitioning output across collections. If `containerName` contains `{partition}` token, this property is required to be specified. PartitionKey pulumi.StringPtrInput // The ID of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId pulumi.StringInput } func (OutputCosmosdbArgs) ElementType() reflect.Type { return reflect.TypeOf((*outputCosmosdbArgs)(nil)).Elem() } type OutputCosmosdbInput interface { pulumi.Input ToOutputCosmosdbOutput() OutputCosmosdbOutput ToOutputCosmosdbOutputWithContext(ctx context.Context) OutputCosmosdbOutput } func (*OutputCosmosdb) ElementType() reflect.Type { return reflect.TypeOf((**OutputCosmosdb)(nil)).Elem() } func (i *OutputCosmosdb) ToOutputCosmosdbOutput() OutputCosmosdbOutput { return i.ToOutputCosmosdbOutputWithContext(context.Background()) } func (i *OutputCosmosdb) ToOutputCosmosdbOutputWithContext(ctx context.Context) OutputCosmosdbOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputCosmosdbOutput) } // OutputCosmosdbArrayInput is an input type that accepts OutputCosmosdbArray and OutputCosmosdbArrayOutput values. // You can construct a concrete instance of `OutputCosmosdbArrayInput` via: // // OutputCosmosdbArray{ OutputCosmosdbArgs{...} } type OutputCosmosdbArrayInput interface { pulumi.Input ToOutputCosmosdbArrayOutput() OutputCosmosdbArrayOutput ToOutputCosmosdbArrayOutputWithContext(context.Context) OutputCosmosdbArrayOutput } type OutputCosmosdbArray []OutputCosmosdbInput func (OutputCosmosdbArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputCosmosdb)(nil)).Elem() } func (i OutputCosmosdbArray) ToOutputCosmosdbArrayOutput() OutputCosmosdbArrayOutput { return i.ToOutputCosmosdbArrayOutputWithContext(context.Background()) } func (i OutputCosmosdbArray) ToOutputCosmosdbArrayOutputWithContext(ctx context.Context) OutputCosmosdbArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputCosmosdbArrayOutput) } // OutputCosmosdbMapInput is an input type that accepts OutputCosmosdbMap and OutputCosmosdbMapOutput values. // You can construct a concrete instance of `OutputCosmosdbMapInput` via: // // OutputCosmosdbMap{ "key": OutputCosmosdbArgs{...} } type OutputCosmosdbMapInput interface { pulumi.Input ToOutputCosmosdbMapOutput() OutputCosmosdbMapOutput ToOutputCosmosdbMapOutputWithContext(context.Context) OutputCosmosdbMapOutput } type OutputCosmosdbMap map[string]OutputCosmosdbInput func (OutputCosmosdbMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputCosmosdb)(nil)).Elem() } func (i OutputCosmosdbMap) ToOutputCosmosdbMapOutput() OutputCosmosdbMapOutput { return i.ToOutputCosmosdbMapOutputWithContext(context.Background()) } func (i OutputCosmosdbMap) ToOutputCosmosdbMapOutputWithContext(ctx context.Context) OutputCosmosdbMapOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputCosmosdbMapOutput) } type OutputCosmosdbOutput struct{ *pulumi.OutputState } func (OutputCosmosdbOutput) ElementType() reflect.Type { return reflect.TypeOf((**OutputCosmosdb)(nil)).Elem() } func (o OutputCosmosdbOutput) ToOutputCosmosdbOutput() OutputCosmosdbOutput { return o } func (o OutputCosmosdbOutput) ToOutputCosmosdbOutputWithContext(ctx context.Context) OutputCosmosdbOutput { return o } // The authentication mode for the CosmosDB database. Possible values are `ConnectionString` and `Msi`. Defaults to `ConnectionString`. func (o OutputCosmosdbOutput) AuthenticationMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputCosmosdb) pulumi.StringPtrOutput { return v.AuthenticationMode }).(pulumi.StringPtrOutput) } // The name of the CosmosDB container. func (o OutputCosmosdbOutput) ContainerName() pulumi.StringOutput { return o.ApplyT(func(v *OutputCosmosdb) pulumi.StringOutput { return v.ContainerName }).(pulumi.StringOutput) } // The account key for the CosmosDB database. func (o OutputCosmosdbOutput) CosmosdbAccountKey() pulumi.StringOutput { return o.ApplyT(func(v *OutputCosmosdb) pulumi.StringOutput { return v.CosmosdbAccountKey }).(pulumi.StringOutput) } // The ID of the CosmosDB database. func (o OutputCosmosdbOutput) CosmosdbSqlDatabaseId() pulumi.StringOutput { return o.ApplyT(func(v *OutputCosmosdb) pulumi.StringOutput { return v.CosmosdbSqlDatabaseId }).(pulumi.StringOutput) } // The name of the field in output events used to specify the primary key which insert or update operations are based on. func (o OutputCosmosdbOutput) DocumentId() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputCosmosdb) pulumi.StringPtrOutput { return v.DocumentId }).(pulumi.StringPtrOutput) } // The name of the Stream Analytics Output. Changing this forces a new resource to be created. func (o OutputCosmosdbOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *OutputCosmosdb) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the field in output events used to specify the key for partitioning output across collections. If `containerName` contains `{partition}` token, this property is required to be specified. func (o OutputCosmosdbOutput) PartitionKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputCosmosdb) pulumi.StringPtrOutput { return v.PartitionKey }).(pulumi.StringPtrOutput) } // The ID of the Stream Analytics Job. Changing this forces a new resource to be created. func (o OutputCosmosdbOutput) StreamAnalyticsJobId() pulumi.StringOutput { return o.ApplyT(func(v *OutputCosmosdb) pulumi.StringOutput { return v.StreamAnalyticsJobId }).(pulumi.StringOutput) } type OutputCosmosdbArrayOutput struct{ *pulumi.OutputState } func (OutputCosmosdbArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputCosmosdb)(nil)).Elem() } func (o OutputCosmosdbArrayOutput) ToOutputCosmosdbArrayOutput() OutputCosmosdbArrayOutput { return o } func (o OutputCosmosdbArrayOutput) ToOutputCosmosdbArrayOutputWithContext(ctx context.Context) OutputCosmosdbArrayOutput { return o } func (o OutputCosmosdbArrayOutput) Index(i pulumi.IntInput) OutputCosmosdbOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *OutputCosmosdb { return vs[0].([]*OutputCosmosdb)[vs[1].(int)] }).(OutputCosmosdbOutput) } type OutputCosmosdbMapOutput struct{ *pulumi.OutputState } func (OutputCosmosdbMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputCosmosdb)(nil)).Elem() } func (o OutputCosmosdbMapOutput) ToOutputCosmosdbMapOutput() OutputCosmosdbMapOutput { return o } func (o OutputCosmosdbMapOutput) ToOutputCosmosdbMapOutputWithContext(ctx context.Context) OutputCosmosdbMapOutput { return o } func (o OutputCosmosdbMapOutput) MapIndex(k pulumi.StringInput) OutputCosmosdbOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *OutputCosmosdb { return vs[0].(map[string]*OutputCosmosdb)[vs[1].(string)] }).(OutputCosmosdbOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*OutputCosmosdbInput)(nil)).Elem(), &OutputCosmosdb{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputCosmosdbArrayInput)(nil)).Elem(), OutputCosmosdbArray{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputCosmosdbMapInput)(nil)).Elem(), OutputCosmosdbMap{}) pulumi.RegisterOutputType(OutputCosmosdbOutput{}) pulumi.RegisterOutputType(OutputCosmosdbArrayOutput{}) pulumi.RegisterOutputType(OutputCosmosdbMapOutput{}) }
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/streamanalytics/getJob.go
sdk/go/azure/streamanalytics/getJob.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 streamanalytics 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 Stream Analytics Job. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := streamanalytics.LookupJob(ctx, &streamanalytics.LookupJobArgs{ // Name: "example-job", // ResourceGroupName: "example-resources", // }, nil) // if err != nil { // return err // } // ctx.Export("jobId", example.JobId) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.StreamAnalytics` - 2021-10-01-preview func LookupJob(ctx *pulumi.Context, args *LookupJobArgs, opts ...pulumi.InvokeOption) (*LookupJobResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupJobResult err := ctx.Invoke("azure:streamanalytics/getJob:getJob", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getJob. type LookupJobArgs struct { // Specifies the name of the Stream Analytics Job. Name string `pulumi:"name"` // Specifies the name of the resource group the Stream Analytics Job is located in. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getJob. type LookupJobResult struct { // The compatibility level for this job. CompatibilityLevel string `pulumi:"compatibilityLevel"` // The Data Locale of the Job. DataLocale string `pulumi:"dataLocale"` // The maximum tolerable delay in seconds where events arriving late could be included. EventsLateArrivalMaxDelayInSeconds int `pulumi:"eventsLateArrivalMaxDelayInSeconds"` // The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. EventsOutOfOrderMaxDelayInSeconds int `pulumi:"eventsOutOfOrderMaxDelayInSeconds"` // The policy which should be applied to events which arrive out of order in the input event stream. EventsOutOfOrderPolicy string `pulumi:"eventsOutOfOrderPolicy"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // An `identity` block as defined below. Identities []GetJobIdentity `pulumi:"identities"` // The Job ID assigned by the Stream Analytics Job. JobId string `pulumi:"jobId"` // The time at which the Stream Analytics job last produced an output. LastOutputTime string `pulumi:"lastOutputTime"` // The Azure location where the Stream Analytics Job exists. Location string `pulumi:"location"` Name string `pulumi:"name"` // The policy which should be applied to events which arrive at the output and cannot be written to the external storage due to being malformed (such as missing column values, column values of wrong type or size). OutputErrorPolicy string `pulumi:"outputErrorPolicy"` ResourceGroupName string `pulumi:"resourceGroupName"` // The SKU Name to use for the Stream Analytics Job. SkuName string `pulumi:"skuName"` // The starting mode set for this Stream Analytics Job. StartMode string `pulumi:"startMode"` // The time at which this Stream Analytics Job was scheduled to start. StartTime string `pulumi:"startTime"` // The number of streaming units that this Stream Analytics Job uses. StreamingUnits int `pulumi:"streamingUnits"` // The query that will be run in this Stream Analytics Job, [written in Stream Analytics Query Language (SAQL)](https://msdn.microsoft.com/library/azure/dn834998). TransformationQuery string `pulumi:"transformationQuery"` } func LookupJobOutput(ctx *pulumi.Context, args LookupJobOutputArgs, opts ...pulumi.InvokeOption) LookupJobResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupJobResultOutput, error) { args := v.(LookupJobArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:streamanalytics/getJob:getJob", args, LookupJobResultOutput{}, options).(LookupJobResultOutput), nil }).(LookupJobResultOutput) } // A collection of arguments for invoking getJob. type LookupJobOutputArgs struct { // Specifies the name of the Stream Analytics Job. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group the Stream Analytics Job is located in. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupJobOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupJobArgs)(nil)).Elem() } // A collection of values returned by getJob. type LookupJobResultOutput struct{ *pulumi.OutputState } func (LookupJobResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupJobResult)(nil)).Elem() } func (o LookupJobResultOutput) ToLookupJobResultOutput() LookupJobResultOutput { return o } func (o LookupJobResultOutput) ToLookupJobResultOutputWithContext(ctx context.Context) LookupJobResultOutput { return o } // The compatibility level for this job. func (o LookupJobResultOutput) CompatibilityLevel() pulumi.StringOutput { return o.ApplyT(func(v LookupJobResult) string { return v.CompatibilityLevel }).(pulumi.StringOutput) } // The Data Locale of the Job. func (o LookupJobResultOutput) DataLocale() pulumi.StringOutput { return o.ApplyT(func(v LookupJobResult) string { return v.DataLocale }).(pulumi.StringOutput) } // The maximum tolerable delay in seconds where events arriving late could be included. func (o LookupJobResultOutput) EventsLateArrivalMaxDelayInSeconds() pulumi.IntOutput { return o.ApplyT(func(v LookupJobResult) int { return v.EventsLateArrivalMaxDelayInSeconds }).(pulumi.IntOutput) } // The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. func (o LookupJobResultOutput) EventsOutOfOrderMaxDelayInSeconds() pulumi.IntOutput { return o.ApplyT(func(v LookupJobResult) int { return v.EventsOutOfOrderMaxDelayInSeconds }).(pulumi.IntOutput) } // The policy which should be applied to events which arrive out of order in the input event stream. func (o LookupJobResultOutput) EventsOutOfOrderPolicy() pulumi.StringOutput { return o.ApplyT(func(v LookupJobResult) string { return v.EventsOutOfOrderPolicy }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupJobResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupJobResult) string { return v.Id }).(pulumi.StringOutput) } // An `identity` block as defined below. func (o LookupJobResultOutput) Identities() GetJobIdentityArrayOutput { return o.ApplyT(func(v LookupJobResult) []GetJobIdentity { return v.Identities }).(GetJobIdentityArrayOutput) } // The Job ID assigned by the Stream Analytics Job. func (o LookupJobResultOutput) JobId() pulumi.StringOutput { return o.ApplyT(func(v LookupJobResult) string { return v.JobId }).(pulumi.StringOutput) } // The time at which the Stream Analytics job last produced an output. func (o LookupJobResultOutput) LastOutputTime() pulumi.StringOutput { return o.ApplyT(func(v LookupJobResult) string { return v.LastOutputTime }).(pulumi.StringOutput) } // The Azure location where the Stream Analytics Job exists. func (o LookupJobResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupJobResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupJobResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupJobResult) string { return v.Name }).(pulumi.StringOutput) } // The policy which should be applied to events which arrive at the output and cannot be written to the external storage due to being malformed (such as missing column values, column values of wrong type or size). func (o LookupJobResultOutput) OutputErrorPolicy() pulumi.StringOutput { return o.ApplyT(func(v LookupJobResult) string { return v.OutputErrorPolicy }).(pulumi.StringOutput) } func (o LookupJobResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupJobResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The SKU Name to use for the Stream Analytics Job. func (o LookupJobResultOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v LookupJobResult) string { return v.SkuName }).(pulumi.StringOutput) } // The starting mode set for this Stream Analytics Job. func (o LookupJobResultOutput) StartMode() pulumi.StringOutput { return o.ApplyT(func(v LookupJobResult) string { return v.StartMode }).(pulumi.StringOutput) } // The time at which this Stream Analytics Job was scheduled to start. func (o LookupJobResultOutput) StartTime() pulumi.StringOutput { return o.ApplyT(func(v LookupJobResult) string { return v.StartTime }).(pulumi.StringOutput) } // The number of streaming units that this Stream Analytics Job uses. func (o LookupJobResultOutput) StreamingUnits() pulumi.IntOutput { return o.ApplyT(func(v LookupJobResult) int { return v.StreamingUnits }).(pulumi.IntOutput) } // The query that will be run in this Stream Analytics Job, [written in Stream Analytics Query Language (SAQL)](https://msdn.microsoft.com/library/azure/dn834998). func (o LookupJobResultOutput) TransformationQuery() pulumi.StringOutput { return o.ApplyT(func(v LookupJobResult) string { return v.TransformationQuery }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupJobResultOutput{}) }
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/streamanalytics/outputTable.go
sdk/go/azure/streamanalytics/outputTable.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Output Table. // // ## 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "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("rg-example"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // example := streamanalytics.LookupJobOutput(ctx, streamanalytics.GetJobOutputArgs{ // Name: pulumi.String("example-job"), // ResourceGroupName: exampleResourceGroup.Name, // }, nil) // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplesa"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleTable, err := storage.NewTable(ctx, "example", &storage.TableArgs{ // Name: pulumi.String("exampletable"), // StorageAccountName: exampleAccount.Name, // }) // if err != nil { // return err // } // _, err = streamanalytics.NewOutputTable(ctx, "example", &streamanalytics.OutputTableArgs{ // Name: pulumi.String("output-to-storage-table"), // StreamAnalyticsJobName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.Name, nil // }).(pulumi.StringPtrOutput)), // ResourceGroupName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.ResourceGroupName, nil // }).(pulumi.StringPtrOutput)), // StorageAccountName: exampleAccount.Name, // StorageAccountKey: exampleAccount.PrimaryAccessKey, // Table: exampleTable.Name, // PartitionKey: pulumi.String("foo"), // RowKey: pulumi.String("bar"), // BatchSize: pulumi.Int(100), // }) // 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.StreamAnalytics` - 2021-10-01-preview // // ## Import // // Stream Analytics Output to Table can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/outputTable:OutputTable example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/outputs/output1 // ``` type OutputTable struct { pulumi.CustomResourceState // The number of records for a batch operation. Must be between `1` and `100`. BatchSize pulumi.IntOutput `pulumi:"batchSize"` // A list of the column names to be removed from output event entities. ColumnsToRemoves pulumi.StringArrayOutput `pulumi:"columnsToRemoves"` // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the output column that contains the partition key. PartitionKey pulumi.StringOutput `pulumi:"partitionKey"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The name of the output column that contains the row key. RowKey pulumi.StringOutput `pulumi:"rowKey"` // The Access Key which should be used to connect to this Storage Account. StorageAccountKey pulumi.StringOutput `pulumi:"storageAccountKey"` // The name of the Storage Account. StorageAccountName pulumi.StringOutput `pulumi:"storageAccountName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringOutput `pulumi:"streamAnalyticsJobName"` // The name of the table where the stream should be output to. Table pulumi.StringOutput `pulumi:"table"` } // NewOutputTable registers a new resource with the given unique name, arguments, and options. func NewOutputTable(ctx *pulumi.Context, name string, args *OutputTableArgs, opts ...pulumi.ResourceOption) (*OutputTable, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.BatchSize == nil { return nil, errors.New("invalid value for required argument 'BatchSize'") } if args.PartitionKey == nil { return nil, errors.New("invalid value for required argument 'PartitionKey'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.RowKey == nil { return nil, errors.New("invalid value for required argument 'RowKey'") } if args.StorageAccountKey == nil { return nil, errors.New("invalid value for required argument 'StorageAccountKey'") } if args.StorageAccountName == nil { return nil, errors.New("invalid value for required argument 'StorageAccountName'") } if args.StreamAnalyticsJobName == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobName'") } if args.Table == nil { return nil, errors.New("invalid value for required argument 'Table'") } if args.StorageAccountKey != nil { args.StorageAccountKey = pulumi.ToSecret(args.StorageAccountKey).(pulumi.StringInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "storageAccountKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource OutputTable err := ctx.RegisterResource("azure:streamanalytics/outputTable:OutputTable", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetOutputTable gets an existing OutputTable 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 GetOutputTable(ctx *pulumi.Context, name string, id pulumi.IDInput, state *OutputTableState, opts ...pulumi.ResourceOption) (*OutputTable, error) { var resource OutputTable err := ctx.ReadResource("azure:streamanalytics/outputTable:OutputTable", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering OutputTable resources. type outputTableState struct { // The number of records for a batch operation. Must be between `1` and `100`. BatchSize *int `pulumi:"batchSize"` // A list of the column names to be removed from output event entities. ColumnsToRemoves []string `pulumi:"columnsToRemoves"` // The name of the Stream Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the output column that contains the partition key. PartitionKey *string `pulumi:"partitionKey"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The name of the output column that contains the row key. RowKey *string `pulumi:"rowKey"` // The Access Key which should be used to connect to this Storage Account. StorageAccountKey *string `pulumi:"storageAccountKey"` // The name of the Storage Account. StorageAccountName *string `pulumi:"storageAccountName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName *string `pulumi:"streamAnalyticsJobName"` // The name of the table where the stream should be output to. Table *string `pulumi:"table"` } type OutputTableState struct { // The number of records for a batch operation. Must be between `1` and `100`. BatchSize pulumi.IntPtrInput // A list of the column names to be removed from output event entities. ColumnsToRemoves pulumi.StringArrayInput // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the output column that contains the partition key. PartitionKey pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The name of the output column that contains the row key. RowKey pulumi.StringPtrInput // The Access Key which should be used to connect to this Storage Account. StorageAccountKey pulumi.StringPtrInput // The name of the Storage Account. StorageAccountName pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringPtrInput // The name of the table where the stream should be output to. Table pulumi.StringPtrInput } func (OutputTableState) ElementType() reflect.Type { return reflect.TypeOf((*outputTableState)(nil)).Elem() } type outputTableArgs struct { // The number of records for a batch operation. Must be between `1` and `100`. BatchSize int `pulumi:"batchSize"` // A list of the column names to be removed from output event entities. ColumnsToRemoves []string `pulumi:"columnsToRemoves"` // The name of the Stream Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the output column that contains the partition key. PartitionKey string `pulumi:"partitionKey"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The name of the output column that contains the row key. RowKey string `pulumi:"rowKey"` // The Access Key which should be used to connect to this Storage Account. StorageAccountKey string `pulumi:"storageAccountKey"` // The name of the Storage Account. StorageAccountName string `pulumi:"storageAccountName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName string `pulumi:"streamAnalyticsJobName"` // The name of the table where the stream should be output to. Table string `pulumi:"table"` } // The set of arguments for constructing a OutputTable resource. type OutputTableArgs struct { // The number of records for a batch operation. Must be between `1` and `100`. BatchSize pulumi.IntInput // A list of the column names to be removed from output event entities. ColumnsToRemoves pulumi.StringArrayInput // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the output column that contains the partition key. PartitionKey pulumi.StringInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The name of the output column that contains the row key. RowKey pulumi.StringInput // The Access Key which should be used to connect to this Storage Account. StorageAccountKey pulumi.StringInput // The name of the Storage Account. StorageAccountName pulumi.StringInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringInput // The name of the table where the stream should be output to. Table pulumi.StringInput } func (OutputTableArgs) ElementType() reflect.Type { return reflect.TypeOf((*outputTableArgs)(nil)).Elem() } type OutputTableInput interface { pulumi.Input ToOutputTableOutput() OutputTableOutput ToOutputTableOutputWithContext(ctx context.Context) OutputTableOutput } func (*OutputTable) ElementType() reflect.Type { return reflect.TypeOf((**OutputTable)(nil)).Elem() } func (i *OutputTable) ToOutputTableOutput() OutputTableOutput { return i.ToOutputTableOutputWithContext(context.Background()) } func (i *OutputTable) ToOutputTableOutputWithContext(ctx context.Context) OutputTableOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputTableOutput) } // OutputTableArrayInput is an input type that accepts OutputTableArray and OutputTableArrayOutput values. // You can construct a concrete instance of `OutputTableArrayInput` via: // // OutputTableArray{ OutputTableArgs{...} } type OutputTableArrayInput interface { pulumi.Input ToOutputTableArrayOutput() OutputTableArrayOutput ToOutputTableArrayOutputWithContext(context.Context) OutputTableArrayOutput } type OutputTableArray []OutputTableInput func (OutputTableArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputTable)(nil)).Elem() } func (i OutputTableArray) ToOutputTableArrayOutput() OutputTableArrayOutput { return i.ToOutputTableArrayOutputWithContext(context.Background()) } func (i OutputTableArray) ToOutputTableArrayOutputWithContext(ctx context.Context) OutputTableArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputTableArrayOutput) } // OutputTableMapInput is an input type that accepts OutputTableMap and OutputTableMapOutput values. // You can construct a concrete instance of `OutputTableMapInput` via: // // OutputTableMap{ "key": OutputTableArgs{...} } type OutputTableMapInput interface { pulumi.Input ToOutputTableMapOutput() OutputTableMapOutput ToOutputTableMapOutputWithContext(context.Context) OutputTableMapOutput } type OutputTableMap map[string]OutputTableInput func (OutputTableMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputTable)(nil)).Elem() } func (i OutputTableMap) ToOutputTableMapOutput() OutputTableMapOutput { return i.ToOutputTableMapOutputWithContext(context.Background()) } func (i OutputTableMap) ToOutputTableMapOutputWithContext(ctx context.Context) OutputTableMapOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputTableMapOutput) } type OutputTableOutput struct{ *pulumi.OutputState } func (OutputTableOutput) ElementType() reflect.Type { return reflect.TypeOf((**OutputTable)(nil)).Elem() } func (o OutputTableOutput) ToOutputTableOutput() OutputTableOutput { return o } func (o OutputTableOutput) ToOutputTableOutputWithContext(ctx context.Context) OutputTableOutput { return o } // The number of records for a batch operation. Must be between `1` and `100`. func (o OutputTableOutput) BatchSize() pulumi.IntOutput { return o.ApplyT(func(v *OutputTable) pulumi.IntOutput { return v.BatchSize }).(pulumi.IntOutput) } // A list of the column names to be removed from output event entities. func (o OutputTableOutput) ColumnsToRemoves() pulumi.StringArrayOutput { return o.ApplyT(func(v *OutputTable) pulumi.StringArrayOutput { return v.ColumnsToRemoves }).(pulumi.StringArrayOutput) } // The name of the Stream Output. Changing this forces a new resource to be created. func (o OutputTableOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *OutputTable) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the output column that contains the partition key. func (o OutputTableOutput) PartitionKey() pulumi.StringOutput { return o.ApplyT(func(v *OutputTable) pulumi.StringOutput { return v.PartitionKey }).(pulumi.StringOutput) } // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. func (o OutputTableOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *OutputTable) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The name of the output column that contains the row key. func (o OutputTableOutput) RowKey() pulumi.StringOutput { return o.ApplyT(func(v *OutputTable) pulumi.StringOutput { return v.RowKey }).(pulumi.StringOutput) } // The Access Key which should be used to connect to this Storage Account. func (o OutputTableOutput) StorageAccountKey() pulumi.StringOutput { return o.ApplyT(func(v *OutputTable) pulumi.StringOutput { return v.StorageAccountKey }).(pulumi.StringOutput) } // The name of the Storage Account. func (o OutputTableOutput) StorageAccountName() pulumi.StringOutput { return o.ApplyT(func(v *OutputTable) pulumi.StringOutput { return v.StorageAccountName }).(pulumi.StringOutput) } // The name of the Stream Analytics Job. Changing this forces a new resource to be created. func (o OutputTableOutput) StreamAnalyticsJobName() pulumi.StringOutput { return o.ApplyT(func(v *OutputTable) pulumi.StringOutput { return v.StreamAnalyticsJobName }).(pulumi.StringOutput) } // The name of the table where the stream should be output to. func (o OutputTableOutput) Table() pulumi.StringOutput { return o.ApplyT(func(v *OutputTable) pulumi.StringOutput { return v.Table }).(pulumi.StringOutput) } type OutputTableArrayOutput struct{ *pulumi.OutputState } func (OutputTableArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputTable)(nil)).Elem() } func (o OutputTableArrayOutput) ToOutputTableArrayOutput() OutputTableArrayOutput { return o } func (o OutputTableArrayOutput) ToOutputTableArrayOutputWithContext(ctx context.Context) OutputTableArrayOutput { return o } func (o OutputTableArrayOutput) Index(i pulumi.IntInput) OutputTableOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *OutputTable { return vs[0].([]*OutputTable)[vs[1].(int)] }).(OutputTableOutput) } type OutputTableMapOutput struct{ *pulumi.OutputState } func (OutputTableMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputTable)(nil)).Elem() } func (o OutputTableMapOutput) ToOutputTableMapOutput() OutputTableMapOutput { return o } func (o OutputTableMapOutput) ToOutputTableMapOutputWithContext(ctx context.Context) OutputTableMapOutput { return o } func (o OutputTableMapOutput) MapIndex(k pulumi.StringInput) OutputTableOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *OutputTable { return vs[0].(map[string]*OutputTable)[vs[1].(string)] }).(OutputTableOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*OutputTableInput)(nil)).Elem(), &OutputTable{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputTableArrayInput)(nil)).Elem(), OutputTableArray{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputTableMapInput)(nil)).Elem(), OutputTableMap{}) pulumi.RegisterOutputType(OutputTableOutput{}) pulumi.RegisterOutputType(OutputTableArrayOutput{}) pulumi.RegisterOutputType(OutputTableMapOutput{}) }
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/streamanalytics/outputServiceBusQueue.go
sdk/go/azure/streamanalytics/outputServiceBusQueue.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Output to a ServiceBus Queue. // // ## 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/servicebus" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "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("rg-example"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // example := streamanalytics.LookupJobOutput(ctx, streamanalytics.GetJobOutputArgs{ // Name: pulumi.String("example-job"), // ResourceGroupName: exampleResourceGroup.Name, // }, nil) // exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{ // Name: pulumi.String("example-namespace"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // exampleQueue, err := servicebus.NewQueue(ctx, "example", &servicebus.QueueArgs{ // Name: pulumi.String("example-queue"), // NamespaceId: exampleNamespace.ID(), // EnablePartitioning: true, // }) // if err != nil { // return err // } // _, err = streamanalytics.NewOutputServiceBusQueue(ctx, "example", &streamanalytics.OutputServiceBusQueueArgs{ // Name: pulumi.String("blob-storage-output"), // StreamAnalyticsJobName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.Name, nil // }).(pulumi.StringPtrOutput)), // ResourceGroupName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.ResourceGroupName, nil // }).(pulumi.StringPtrOutput)), // QueueName: exampleQueue.Name, // ServicebusNamespace: exampleNamespace.Name, // SharedAccessPolicyKey: exampleNamespace.DefaultPrimaryKey, // SharedAccessPolicyName: pulumi.String("RootManageSharedAccessKey"), // Serialization: &streamanalytics.OutputServiceBusQueueSerializationArgs{ // Type: pulumi.String("Csv"), // Format: pulumi.String("Array"), // }, // }) // 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.StreamAnalytics` - 2021-10-01-preview // // ## Import // // Stream Analytics Output ServiceBus Queue's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/outputServiceBusQueue:OutputServiceBusQueue example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/outputs/output1 // ``` type OutputServiceBusQueue struct { pulumi.CustomResourceState // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrOutput `pulumi:"authenticationMode"` // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A list of property columns to add to the Service Bus Queue output. PropertyColumns pulumi.StringArrayOutput `pulumi:"propertyColumns"` // The name of the Service Bus Queue. QueueName pulumi.StringOutput `pulumi:"queueName"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization OutputServiceBusQueueSerializationOutput `pulumi:"serialization"` // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace pulumi.StringOutput `pulumi:"servicebusNamespace"` // The shared access policy key for the specified shared access policy. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyKey pulumi.StringPtrOutput `pulumi:"sharedAccessPolicyKey"` // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyName pulumi.StringPtrOutput `pulumi:"sharedAccessPolicyName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringOutput `pulumi:"streamAnalyticsJobName"` // A key-value pair of system property columns that will be attached to the outgoing messages for the Service Bus Queue Output. // // > **Note:** The acceptable keys are `ContentType`, `CorrelationId`, `Label`, `MessageId`, `PartitionKey`, `ReplyTo`, `ReplyToSessionId`, `ScheduledEnqueueTimeUtc`, `SessionId`, `TimeToLive` and `To`. SystemPropertyColumns pulumi.StringMapOutput `pulumi:"systemPropertyColumns"` } // NewOutputServiceBusQueue registers a new resource with the given unique name, arguments, and options. func NewOutputServiceBusQueue(ctx *pulumi.Context, name string, args *OutputServiceBusQueueArgs, opts ...pulumi.ResourceOption) (*OutputServiceBusQueue, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.QueueName == nil { return nil, errors.New("invalid value for required argument 'QueueName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Serialization == nil { return nil, errors.New("invalid value for required argument 'Serialization'") } if args.ServicebusNamespace == nil { return nil, errors.New("invalid value for required argument 'ServicebusNamespace'") } if args.StreamAnalyticsJobName == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobName'") } if args.SharedAccessPolicyKey != nil { args.SharedAccessPolicyKey = pulumi.ToSecret(args.SharedAccessPolicyKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "sharedAccessPolicyKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource OutputServiceBusQueue err := ctx.RegisterResource("azure:streamanalytics/outputServiceBusQueue:OutputServiceBusQueue", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetOutputServiceBusQueue gets an existing OutputServiceBusQueue 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 GetOutputServiceBusQueue(ctx *pulumi.Context, name string, id pulumi.IDInput, state *OutputServiceBusQueueState, opts ...pulumi.ResourceOption) (*OutputServiceBusQueue, error) { var resource OutputServiceBusQueue err := ctx.ReadResource("azure:streamanalytics/outputServiceBusQueue:OutputServiceBusQueue", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering OutputServiceBusQueue resources. type outputServiceBusQueueState struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The name of the Stream Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of property columns to add to the Service Bus Queue output. PropertyColumns []string `pulumi:"propertyColumns"` // The name of the Service Bus Queue. QueueName *string `pulumi:"queueName"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization *OutputServiceBusQueueSerialization `pulumi:"serialization"` // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace *string `pulumi:"servicebusNamespace"` // The shared access policy key for the specified shared access policy. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyKey *string `pulumi:"sharedAccessPolicyKey"` // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyName *string `pulumi:"sharedAccessPolicyName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName *string `pulumi:"streamAnalyticsJobName"` // A key-value pair of system property columns that will be attached to the outgoing messages for the Service Bus Queue Output. // // > **Note:** The acceptable keys are `ContentType`, `CorrelationId`, `Label`, `MessageId`, `PartitionKey`, `ReplyTo`, `ReplyToSessionId`, `ScheduledEnqueueTimeUtc`, `SessionId`, `TimeToLive` and `To`. SystemPropertyColumns map[string]string `pulumi:"systemPropertyColumns"` } type OutputServiceBusQueueState struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of property columns to add to the Service Bus Queue output. PropertyColumns pulumi.StringArrayInput // The name of the Service Bus Queue. QueueName pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `serialization` block as defined below. Serialization OutputServiceBusQueueSerializationPtrInput // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace pulumi.StringPtrInput // The shared access policy key for the specified shared access policy. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyKey pulumi.StringPtrInput // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyName pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringPtrInput // A key-value pair of system property columns that will be attached to the outgoing messages for the Service Bus Queue Output. // // > **Note:** The acceptable keys are `ContentType`, `CorrelationId`, `Label`, `MessageId`, `PartitionKey`, `ReplyTo`, `ReplyToSessionId`, `ScheduledEnqueueTimeUtc`, `SessionId`, `TimeToLive` and `To`. SystemPropertyColumns pulumi.StringMapInput } func (OutputServiceBusQueueState) ElementType() reflect.Type { return reflect.TypeOf((*outputServiceBusQueueState)(nil)).Elem() } type outputServiceBusQueueArgs struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The name of the Stream Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of property columns to add to the Service Bus Queue output. PropertyColumns []string `pulumi:"propertyColumns"` // The name of the Service Bus Queue. QueueName string `pulumi:"queueName"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization OutputServiceBusQueueSerialization `pulumi:"serialization"` // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace string `pulumi:"servicebusNamespace"` // The shared access policy key for the specified shared access policy. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyKey *string `pulumi:"sharedAccessPolicyKey"` // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyName *string `pulumi:"sharedAccessPolicyName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName string `pulumi:"streamAnalyticsJobName"` // A key-value pair of system property columns that will be attached to the outgoing messages for the Service Bus Queue Output. // // > **Note:** The acceptable keys are `ContentType`, `CorrelationId`, `Label`, `MessageId`, `PartitionKey`, `ReplyTo`, `ReplyToSessionId`, `ScheduledEnqueueTimeUtc`, `SessionId`, `TimeToLive` and `To`. SystemPropertyColumns map[string]string `pulumi:"systemPropertyColumns"` } // The set of arguments for constructing a OutputServiceBusQueue resource. type OutputServiceBusQueueArgs struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of property columns to add to the Service Bus Queue output. PropertyColumns pulumi.StringArrayInput // The name of the Service Bus Queue. QueueName pulumi.StringInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A `serialization` block as defined below. Serialization OutputServiceBusQueueSerializationInput // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace pulumi.StringInput // The shared access policy key for the specified shared access policy. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyKey pulumi.StringPtrInput // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyName pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringInput // A key-value pair of system property columns that will be attached to the outgoing messages for the Service Bus Queue Output. // // > **Note:** The acceptable keys are `ContentType`, `CorrelationId`, `Label`, `MessageId`, `PartitionKey`, `ReplyTo`, `ReplyToSessionId`, `ScheduledEnqueueTimeUtc`, `SessionId`, `TimeToLive` and `To`. SystemPropertyColumns pulumi.StringMapInput } func (OutputServiceBusQueueArgs) ElementType() reflect.Type { return reflect.TypeOf((*outputServiceBusQueueArgs)(nil)).Elem() } type OutputServiceBusQueueInput interface { pulumi.Input ToOutputServiceBusQueueOutput() OutputServiceBusQueueOutput ToOutputServiceBusQueueOutputWithContext(ctx context.Context) OutputServiceBusQueueOutput } func (*OutputServiceBusQueue) ElementType() reflect.Type { return reflect.TypeOf((**OutputServiceBusQueue)(nil)).Elem() } func (i *OutputServiceBusQueue) ToOutputServiceBusQueueOutput() OutputServiceBusQueueOutput { return i.ToOutputServiceBusQueueOutputWithContext(context.Background()) } func (i *OutputServiceBusQueue) ToOutputServiceBusQueueOutputWithContext(ctx context.Context) OutputServiceBusQueueOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputServiceBusQueueOutput) } // OutputServiceBusQueueArrayInput is an input type that accepts OutputServiceBusQueueArray and OutputServiceBusQueueArrayOutput values. // You can construct a concrete instance of `OutputServiceBusQueueArrayInput` via: // // OutputServiceBusQueueArray{ OutputServiceBusQueueArgs{...} } type OutputServiceBusQueueArrayInput interface { pulumi.Input ToOutputServiceBusQueueArrayOutput() OutputServiceBusQueueArrayOutput ToOutputServiceBusQueueArrayOutputWithContext(context.Context) OutputServiceBusQueueArrayOutput } type OutputServiceBusQueueArray []OutputServiceBusQueueInput func (OutputServiceBusQueueArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputServiceBusQueue)(nil)).Elem() } func (i OutputServiceBusQueueArray) ToOutputServiceBusQueueArrayOutput() OutputServiceBusQueueArrayOutput { return i.ToOutputServiceBusQueueArrayOutputWithContext(context.Background()) } func (i OutputServiceBusQueueArray) ToOutputServiceBusQueueArrayOutputWithContext(ctx context.Context) OutputServiceBusQueueArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputServiceBusQueueArrayOutput) } // OutputServiceBusQueueMapInput is an input type that accepts OutputServiceBusQueueMap and OutputServiceBusQueueMapOutput values. // You can construct a concrete instance of `OutputServiceBusQueueMapInput` via: // // OutputServiceBusQueueMap{ "key": OutputServiceBusQueueArgs{...} } type OutputServiceBusQueueMapInput interface { pulumi.Input ToOutputServiceBusQueueMapOutput() OutputServiceBusQueueMapOutput ToOutputServiceBusQueueMapOutputWithContext(context.Context) OutputServiceBusQueueMapOutput } type OutputServiceBusQueueMap map[string]OutputServiceBusQueueInput func (OutputServiceBusQueueMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputServiceBusQueue)(nil)).Elem() } func (i OutputServiceBusQueueMap) ToOutputServiceBusQueueMapOutput() OutputServiceBusQueueMapOutput { return i.ToOutputServiceBusQueueMapOutputWithContext(context.Background()) } func (i OutputServiceBusQueueMap) ToOutputServiceBusQueueMapOutputWithContext(ctx context.Context) OutputServiceBusQueueMapOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputServiceBusQueueMapOutput) } type OutputServiceBusQueueOutput struct{ *pulumi.OutputState } func (OutputServiceBusQueueOutput) ElementType() reflect.Type { return reflect.TypeOf((**OutputServiceBusQueue)(nil)).Elem() } func (o OutputServiceBusQueueOutput) ToOutputServiceBusQueueOutput() OutputServiceBusQueueOutput { return o } func (o OutputServiceBusQueueOutput) ToOutputServiceBusQueueOutputWithContext(ctx context.Context) OutputServiceBusQueueOutput { return o } // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. func (o OutputServiceBusQueueOutput) AuthenticationMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputServiceBusQueue) pulumi.StringPtrOutput { return v.AuthenticationMode }).(pulumi.StringPtrOutput) } // The name of the Stream Output. Changing this forces a new resource to be created. func (o OutputServiceBusQueueOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *OutputServiceBusQueue) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A list of property columns to add to the Service Bus Queue output. func (o OutputServiceBusQueueOutput) PropertyColumns() pulumi.StringArrayOutput { return o.ApplyT(func(v *OutputServiceBusQueue) pulumi.StringArrayOutput { return v.PropertyColumns }).(pulumi.StringArrayOutput) } // The name of the Service Bus Queue. func (o OutputServiceBusQueueOutput) QueueName() pulumi.StringOutput { return o.ApplyT(func(v *OutputServiceBusQueue) pulumi.StringOutput { return v.QueueName }).(pulumi.StringOutput) } // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. func (o OutputServiceBusQueueOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *OutputServiceBusQueue) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `serialization` block as defined below. func (o OutputServiceBusQueueOutput) Serialization() OutputServiceBusQueueSerializationOutput { return o.ApplyT(func(v *OutputServiceBusQueue) OutputServiceBusQueueSerializationOutput { return v.Serialization }).(OutputServiceBusQueueSerializationOutput) } // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. func (o OutputServiceBusQueueOutput) ServicebusNamespace() pulumi.StringOutput { return o.ApplyT(func(v *OutputServiceBusQueue) pulumi.StringOutput { return v.ServicebusNamespace }).(pulumi.StringOutput) } // The shared access policy key for the specified shared access policy. Required if `authenticationMode` is `ConnectionString`. func (o OutputServiceBusQueueOutput) SharedAccessPolicyKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputServiceBusQueue) pulumi.StringPtrOutput { return v.SharedAccessPolicyKey }).(pulumi.StringPtrOutput) } // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required if `authenticationMode` is `ConnectionString`. func (o OutputServiceBusQueueOutput) SharedAccessPolicyName() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputServiceBusQueue) pulumi.StringPtrOutput { return v.SharedAccessPolicyName }).(pulumi.StringPtrOutput) } // The name of the Stream Analytics Job. Changing this forces a new resource to be created. func (o OutputServiceBusQueueOutput) StreamAnalyticsJobName() pulumi.StringOutput { return o.ApplyT(func(v *OutputServiceBusQueue) pulumi.StringOutput { return v.StreamAnalyticsJobName }).(pulumi.StringOutput) } // A key-value pair of system property columns that will be attached to the outgoing messages for the Service Bus Queue Output. // // > **Note:** The acceptable keys are `ContentType`, `CorrelationId`, `Label`, `MessageId`, `PartitionKey`, `ReplyTo`, `ReplyToSessionId`, `ScheduledEnqueueTimeUtc`, `SessionId`, `TimeToLive` and `To`. func (o OutputServiceBusQueueOutput) SystemPropertyColumns() pulumi.StringMapOutput { return o.ApplyT(func(v *OutputServiceBusQueue) pulumi.StringMapOutput { return v.SystemPropertyColumns }).(pulumi.StringMapOutput) } type OutputServiceBusQueueArrayOutput struct{ *pulumi.OutputState } func (OutputServiceBusQueueArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputServiceBusQueue)(nil)).Elem() } func (o OutputServiceBusQueueArrayOutput) ToOutputServiceBusQueueArrayOutput() OutputServiceBusQueueArrayOutput { return o } func (o OutputServiceBusQueueArrayOutput) ToOutputServiceBusQueueArrayOutputWithContext(ctx context.Context) OutputServiceBusQueueArrayOutput { return o } func (o OutputServiceBusQueueArrayOutput) Index(i pulumi.IntInput) OutputServiceBusQueueOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *OutputServiceBusQueue { return vs[0].([]*OutputServiceBusQueue)[vs[1].(int)] }).(OutputServiceBusQueueOutput) } type OutputServiceBusQueueMapOutput struct{ *pulumi.OutputState } func (OutputServiceBusQueueMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputServiceBusQueue)(nil)).Elem() } func (o OutputServiceBusQueueMapOutput) ToOutputServiceBusQueueMapOutput() OutputServiceBusQueueMapOutput { return o } func (o OutputServiceBusQueueMapOutput) ToOutputServiceBusQueueMapOutputWithContext(ctx context.Context) OutputServiceBusQueueMapOutput { return o } func (o OutputServiceBusQueueMapOutput) MapIndex(k pulumi.StringInput) OutputServiceBusQueueOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *OutputServiceBusQueue { return vs[0].(map[string]*OutputServiceBusQueue)[vs[1].(string)] }).(OutputServiceBusQueueOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*OutputServiceBusQueueInput)(nil)).Elem(), &OutputServiceBusQueue{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputServiceBusQueueArrayInput)(nil)).Elem(), OutputServiceBusQueueArray{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputServiceBusQueueMapInput)(nil)).Elem(), OutputServiceBusQueueMap{}) pulumi.RegisterOutputType(OutputServiceBusQueueOutput{}) pulumi.RegisterOutputType(OutputServiceBusQueueArrayOutput{}) pulumi.RegisterOutputType(OutputServiceBusQueueMapOutput{}) }
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/streamanalytics/jobStorageAccount.go
sdk/go/azure/streamanalytics/jobStorageAccount.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Job Storage Account. Use this resource for managing the Job Storage Account using `Msi` authentication with a `SystemAssigned` identity. // // > **Note:** The Job Storage Account for a Stream Analytics Job can be managed on the `streamanalytics.Job` resource with the `jobStorageAccount` block, or with this resource. We do not recommend managing the Job Storage Account through both means as this can lead to conflicts. // // ## 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "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 // } // exampleJob, err := streamanalytics.NewJob(ctx, "example", &streamanalytics.JobArgs{ // Name: pulumi.String("example-job"), // ResourceGroupName: example.Name, // Location: example.Location, // CompatibilityLevel: pulumi.String("1.2"), // DataLocale: pulumi.String("en-GB"), // EventsLateArrivalMaxDelayInSeconds: pulumi.Int(60), // EventsOutOfOrderMaxDelayInSeconds: pulumi.Int(50), // EventsOutOfOrderPolicy: pulumi.String("Adjust"), // OutputErrorPolicy: pulumi.String("Drop"), // StreamingUnits: pulumi.Int(3), // SkuName: pulumi.String("StandardV2"), // Identity: &streamanalytics.JobIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // Tags: pulumi.StringMap{ // "environment": pulumi.String("Example"), // }, // TransformationQuery: pulumi.String(" SELECT *\n INTO [YourOutputAlias]\n FROM [YourInputAlias]\n"), // }) // if err != nil { // return err // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("exampleaccount"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // _, err = streamanalytics.NewJobStorageAccount(ctx, "example", &streamanalytics.JobStorageAccountArgs{ // StreamAnalyticsJobId: exampleJob.ID(), // StorageAccountName: exampleAccount.Name, // AuthenticationMode: pulumi.String("Msi"), // }) // 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.StreamAnalytics` - 2021-10-01-preview // // ## Import // // Stream Analytics Job Storage Accounts can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/jobStorageAccount:JobStorageAccount example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1 // ``` type JobStorageAccount struct { pulumi.CustomResourceState // The authentication mode for the Stream Analytics Job's Storage Account. Possible values are `ConnectionString`, and `Msi`. AuthenticationMode pulumi.StringOutput `pulumi:"authenticationMode"` StorageAccountKey pulumi.StringPtrOutput `pulumi:"storageAccountKey"` StorageAccountName pulumi.StringOutput `pulumi:"storageAccountName"` // The ID of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId pulumi.StringOutput `pulumi:"streamAnalyticsJobId"` } // NewJobStorageAccount registers a new resource with the given unique name, arguments, and options. func NewJobStorageAccount(ctx *pulumi.Context, name string, args *JobStorageAccountArgs, opts ...pulumi.ResourceOption) (*JobStorageAccount, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.AuthenticationMode == nil { return nil, errors.New("invalid value for required argument 'AuthenticationMode'") } if args.StorageAccountName == nil { return nil, errors.New("invalid value for required argument 'StorageAccountName'") } if args.StreamAnalyticsJobId == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobId'") } if args.StorageAccountKey != nil { args.StorageAccountKey = pulumi.ToSecret(args.StorageAccountKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "storageAccountKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource JobStorageAccount err := ctx.RegisterResource("azure:streamanalytics/jobStorageAccount:JobStorageAccount", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetJobStorageAccount gets an existing JobStorageAccount 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 GetJobStorageAccount(ctx *pulumi.Context, name string, id pulumi.IDInput, state *JobStorageAccountState, opts ...pulumi.ResourceOption) (*JobStorageAccount, error) { var resource JobStorageAccount err := ctx.ReadResource("azure:streamanalytics/jobStorageAccount:JobStorageAccount", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering JobStorageAccount resources. type jobStorageAccountState struct { // The authentication mode for the Stream Analytics Job's Storage Account. Possible values are `ConnectionString`, and `Msi`. AuthenticationMode *string `pulumi:"authenticationMode"` StorageAccountKey *string `pulumi:"storageAccountKey"` StorageAccountName *string `pulumi:"storageAccountName"` // The ID of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId *string `pulumi:"streamAnalyticsJobId"` } type JobStorageAccountState struct { // The authentication mode for the Stream Analytics Job's Storage Account. Possible values are `ConnectionString`, and `Msi`. AuthenticationMode pulumi.StringPtrInput StorageAccountKey pulumi.StringPtrInput StorageAccountName pulumi.StringPtrInput // The ID of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId pulumi.StringPtrInput } func (JobStorageAccountState) ElementType() reflect.Type { return reflect.TypeOf((*jobStorageAccountState)(nil)).Elem() } type jobStorageAccountArgs struct { // The authentication mode for the Stream Analytics Job's Storage Account. Possible values are `ConnectionString`, and `Msi`. AuthenticationMode string `pulumi:"authenticationMode"` StorageAccountKey *string `pulumi:"storageAccountKey"` StorageAccountName string `pulumi:"storageAccountName"` // The ID of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId string `pulumi:"streamAnalyticsJobId"` } // The set of arguments for constructing a JobStorageAccount resource. type JobStorageAccountArgs struct { // The authentication mode for the Stream Analytics Job's Storage Account. Possible values are `ConnectionString`, and `Msi`. AuthenticationMode pulumi.StringInput StorageAccountKey pulumi.StringPtrInput StorageAccountName pulumi.StringInput // The ID of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId pulumi.StringInput } func (JobStorageAccountArgs) ElementType() reflect.Type { return reflect.TypeOf((*jobStorageAccountArgs)(nil)).Elem() } type JobStorageAccountInput interface { pulumi.Input ToJobStorageAccountOutput() JobStorageAccountOutput ToJobStorageAccountOutputWithContext(ctx context.Context) JobStorageAccountOutput } func (*JobStorageAccount) ElementType() reflect.Type { return reflect.TypeOf((**JobStorageAccount)(nil)).Elem() } func (i *JobStorageAccount) ToJobStorageAccountOutput() JobStorageAccountOutput { return i.ToJobStorageAccountOutputWithContext(context.Background()) } func (i *JobStorageAccount) ToJobStorageAccountOutputWithContext(ctx context.Context) JobStorageAccountOutput { return pulumi.ToOutputWithContext(ctx, i).(JobStorageAccountOutput) } // JobStorageAccountArrayInput is an input type that accepts JobStorageAccountArray and JobStorageAccountArrayOutput values. // You can construct a concrete instance of `JobStorageAccountArrayInput` via: // // JobStorageAccountArray{ JobStorageAccountArgs{...} } type JobStorageAccountArrayInput interface { pulumi.Input ToJobStorageAccountArrayOutput() JobStorageAccountArrayOutput ToJobStorageAccountArrayOutputWithContext(context.Context) JobStorageAccountArrayOutput } type JobStorageAccountArray []JobStorageAccountInput func (JobStorageAccountArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*JobStorageAccount)(nil)).Elem() } func (i JobStorageAccountArray) ToJobStorageAccountArrayOutput() JobStorageAccountArrayOutput { return i.ToJobStorageAccountArrayOutputWithContext(context.Background()) } func (i JobStorageAccountArray) ToJobStorageAccountArrayOutputWithContext(ctx context.Context) JobStorageAccountArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(JobStorageAccountArrayOutput) } // JobStorageAccountMapInput is an input type that accepts JobStorageAccountMap and JobStorageAccountMapOutput values. // You can construct a concrete instance of `JobStorageAccountMapInput` via: // // JobStorageAccountMap{ "key": JobStorageAccountArgs{...} } type JobStorageAccountMapInput interface { pulumi.Input ToJobStorageAccountMapOutput() JobStorageAccountMapOutput ToJobStorageAccountMapOutputWithContext(context.Context) JobStorageAccountMapOutput } type JobStorageAccountMap map[string]JobStorageAccountInput func (JobStorageAccountMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*JobStorageAccount)(nil)).Elem() } func (i JobStorageAccountMap) ToJobStorageAccountMapOutput() JobStorageAccountMapOutput { return i.ToJobStorageAccountMapOutputWithContext(context.Background()) } func (i JobStorageAccountMap) ToJobStorageAccountMapOutputWithContext(ctx context.Context) JobStorageAccountMapOutput { return pulumi.ToOutputWithContext(ctx, i).(JobStorageAccountMapOutput) } type JobStorageAccountOutput struct{ *pulumi.OutputState } func (JobStorageAccountOutput) ElementType() reflect.Type { return reflect.TypeOf((**JobStorageAccount)(nil)).Elem() } func (o JobStorageAccountOutput) ToJobStorageAccountOutput() JobStorageAccountOutput { return o } func (o JobStorageAccountOutput) ToJobStorageAccountOutputWithContext(ctx context.Context) JobStorageAccountOutput { return o } // The authentication mode for the Stream Analytics Job's Storage Account. Possible values are `ConnectionString`, and `Msi`. func (o JobStorageAccountOutput) AuthenticationMode() pulumi.StringOutput { return o.ApplyT(func(v *JobStorageAccount) pulumi.StringOutput { return v.AuthenticationMode }).(pulumi.StringOutput) } func (o JobStorageAccountOutput) StorageAccountKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *JobStorageAccount) pulumi.StringPtrOutput { return v.StorageAccountKey }).(pulumi.StringPtrOutput) } func (o JobStorageAccountOutput) StorageAccountName() pulumi.StringOutput { return o.ApplyT(func(v *JobStorageAccount) pulumi.StringOutput { return v.StorageAccountName }).(pulumi.StringOutput) } // The ID of the Stream Analytics Job. Changing this forces a new resource to be created. func (o JobStorageAccountOutput) StreamAnalyticsJobId() pulumi.StringOutput { return o.ApplyT(func(v *JobStorageAccount) pulumi.StringOutput { return v.StreamAnalyticsJobId }).(pulumi.StringOutput) } type JobStorageAccountArrayOutput struct{ *pulumi.OutputState } func (JobStorageAccountArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*JobStorageAccount)(nil)).Elem() } func (o JobStorageAccountArrayOutput) ToJobStorageAccountArrayOutput() JobStorageAccountArrayOutput { return o } func (o JobStorageAccountArrayOutput) ToJobStorageAccountArrayOutputWithContext(ctx context.Context) JobStorageAccountArrayOutput { return o } func (o JobStorageAccountArrayOutput) Index(i pulumi.IntInput) JobStorageAccountOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *JobStorageAccount { return vs[0].([]*JobStorageAccount)[vs[1].(int)] }).(JobStorageAccountOutput) } type JobStorageAccountMapOutput struct{ *pulumi.OutputState } func (JobStorageAccountMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*JobStorageAccount)(nil)).Elem() } func (o JobStorageAccountMapOutput) ToJobStorageAccountMapOutput() JobStorageAccountMapOutput { return o } func (o JobStorageAccountMapOutput) ToJobStorageAccountMapOutputWithContext(ctx context.Context) JobStorageAccountMapOutput { return o } func (o JobStorageAccountMapOutput) MapIndex(k pulumi.StringInput) JobStorageAccountOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *JobStorageAccount { return vs[0].(map[string]*JobStorageAccount)[vs[1].(string)] }).(JobStorageAccountOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*JobStorageAccountInput)(nil)).Elem(), &JobStorageAccount{}) pulumi.RegisterInputType(reflect.TypeOf((*JobStorageAccountArrayInput)(nil)).Elem(), JobStorageAccountArray{}) pulumi.RegisterInputType(reflect.TypeOf((*JobStorageAccountMapInput)(nil)).Elem(), JobStorageAccountMap{}) pulumi.RegisterOutputType(JobStorageAccountOutput{}) pulumi.RegisterOutputType(JobStorageAccountArrayOutput{}) pulumi.RegisterOutputType(JobStorageAccountMapOutput{}) }
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/streamanalytics/outputFunction.go
sdk/go/azure/streamanalytics/outputFunction.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Output Function. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appservice" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageaccount"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // examplePlan, err := appservice.NewPlan(ctx, "example", &appservice.PlanArgs{ // Name: pulumi.String("exampleappserviceplan"), // Location: example.Location, // ResourceGroupName: example.Name, // Kind: pulumi.Any("FunctionApp"), // Reserved: pulumi.Bool(true), // Sku: &appservice.PlanSkuArgs{ // Tier: pulumi.String("Dynamic"), // Size: pulumi.String("Y1"), // }, // }) // if err != nil { // return err // } // exampleFunctionApp, err := appservice.NewFunctionApp(ctx, "example", &appservice.FunctionAppArgs{ // Name: pulumi.String("examplefunctionapp"), // Location: example.Location, // ResourceGroupName: example.Name, // AppServicePlanId: examplePlan.ID(), // StorageAccountName: exampleAccount.Name, // StorageAccountAccessKey: exampleAccount.PrimaryAccessKey, // OsType: pulumi.String("linux"), // Version: pulumi.String("~3"), // }) // if err != nil { // return err // } // exampleJob, err := streamanalytics.NewJob(ctx, "example", &streamanalytics.JobArgs{ // Name: pulumi.String("examplestreamanalyticsjob"), // ResourceGroupName: example.Name, // Location: example.Location, // StreamingUnits: pulumi.Int(3), // TransformationQuery: pulumi.String(" SELECT *\n INTO [YourOutputAlias]\n FROM [YourInputAlias]\n"), // }) // if err != nil { // return err // } // _, err = streamanalytics.NewOutputFunction(ctx, "example", &streamanalytics.OutputFunctionArgs{ // Name: pulumi.String("exampleoutput"), // ResourceGroupName: exampleJob.ResourceGroupName, // StreamAnalyticsJobName: exampleJob.Name, // FunctionApp: exampleFunctionApp.Name, // FunctionName: pulumi.String("examplefunctionname"), // ApiKey: pulumi.String("exampleapikey"), // }) // 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.StreamAnalytics` - 2021-10-01-preview // // ## Import // // Stream Analytics Output Functions can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/outputFunction:OutputFunction example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/outputs/output1 // ``` type OutputFunction struct { pulumi.CustomResourceState // The API key for the Function. ApiKey pulumi.StringOutput `pulumi:"apiKey"` // The maximum number of events in each batch that's sent to the function. Defaults to `100`. BatchMaxCount pulumi.IntPtrOutput `pulumi:"batchMaxCount"` // The maximum batch size in bytes that's sent to the function. Defaults to `262144` (256 kB). BatchMaxInBytes pulumi.IntPtrOutput `pulumi:"batchMaxInBytes"` // The name of the Function App. FunctionApp pulumi.StringOutput `pulumi:"functionApp"` // The name of the function in the Function App. FunctionName pulumi.StringOutput `pulumi:"functionName"` // The name which should be used for this Stream Analytics Output. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the Stream Analytics Output should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringOutput `pulumi:"streamAnalyticsJobName"` } // NewOutputFunction registers a new resource with the given unique name, arguments, and options. func NewOutputFunction(ctx *pulumi.Context, name string, args *OutputFunctionArgs, opts ...pulumi.ResourceOption) (*OutputFunction, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ApiKey == nil { return nil, errors.New("invalid value for required argument 'ApiKey'") } if args.FunctionApp == nil { return nil, errors.New("invalid value for required argument 'FunctionApp'") } if args.FunctionName == nil { return nil, errors.New("invalid value for required argument 'FunctionName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.StreamAnalyticsJobName == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobName'") } if args.ApiKey != nil { args.ApiKey = pulumi.ToSecret(args.ApiKey).(pulumi.StringInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "apiKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource OutputFunction err := ctx.RegisterResource("azure:streamanalytics/outputFunction:OutputFunction", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetOutputFunction gets an existing OutputFunction 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 GetOutputFunction(ctx *pulumi.Context, name string, id pulumi.IDInput, state *OutputFunctionState, opts ...pulumi.ResourceOption) (*OutputFunction, error) { var resource OutputFunction err := ctx.ReadResource("azure:streamanalytics/outputFunction:OutputFunction", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering OutputFunction resources. type outputFunctionState struct { // The API key for the Function. ApiKey *string `pulumi:"apiKey"` // The maximum number of events in each batch that's sent to the function. Defaults to `100`. BatchMaxCount *int `pulumi:"batchMaxCount"` // The maximum batch size in bytes that's sent to the function. Defaults to `262144` (256 kB). BatchMaxInBytes *int `pulumi:"batchMaxInBytes"` // The name of the Function App. FunctionApp *string `pulumi:"functionApp"` // The name of the function in the Function App. FunctionName *string `pulumi:"functionName"` // The name which should be used for this Stream Analytics Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Stream Analytics Output should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName *string `pulumi:"streamAnalyticsJobName"` } type OutputFunctionState struct { // The API key for the Function. ApiKey pulumi.StringPtrInput // The maximum number of events in each batch that's sent to the function. Defaults to `100`. BatchMaxCount pulumi.IntPtrInput // The maximum batch size in bytes that's sent to the function. Defaults to `262144` (256 kB). BatchMaxInBytes pulumi.IntPtrInput // The name of the Function App. FunctionApp pulumi.StringPtrInput // The name of the function in the Function App. FunctionName pulumi.StringPtrInput // The name which should be used for this Stream Analytics Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Output should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringPtrInput } func (OutputFunctionState) ElementType() reflect.Type { return reflect.TypeOf((*outputFunctionState)(nil)).Elem() } type outputFunctionArgs struct { // The API key for the Function. ApiKey string `pulumi:"apiKey"` // The maximum number of events in each batch that's sent to the function. Defaults to `100`. BatchMaxCount *int `pulumi:"batchMaxCount"` // The maximum batch size in bytes that's sent to the function. Defaults to `262144` (256 kB). BatchMaxInBytes *int `pulumi:"batchMaxInBytes"` // The name of the Function App. FunctionApp string `pulumi:"functionApp"` // The name of the function in the Function App. FunctionName string `pulumi:"functionName"` // The name which should be used for this Stream Analytics Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Stream Analytics Output should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName string `pulumi:"streamAnalyticsJobName"` } // The set of arguments for constructing a OutputFunction resource. type OutputFunctionArgs struct { // The API key for the Function. ApiKey pulumi.StringInput // The maximum number of events in each batch that's sent to the function. Defaults to `100`. BatchMaxCount pulumi.IntPtrInput // The maximum batch size in bytes that's sent to the function. Defaults to `262144` (256 kB). BatchMaxInBytes pulumi.IntPtrInput // The name of the Function App. FunctionApp pulumi.StringInput // The name of the function in the Function App. FunctionName pulumi.StringInput // The name which should be used for this Stream Analytics Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Output should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringInput } func (OutputFunctionArgs) ElementType() reflect.Type { return reflect.TypeOf((*outputFunctionArgs)(nil)).Elem() } type OutputFunctionInput interface { pulumi.Input ToOutputFunctionOutput() OutputFunctionOutput ToOutputFunctionOutputWithContext(ctx context.Context) OutputFunctionOutput } func (*OutputFunction) ElementType() reflect.Type { return reflect.TypeOf((**OutputFunction)(nil)).Elem() } func (i *OutputFunction) ToOutputFunctionOutput() OutputFunctionOutput { return i.ToOutputFunctionOutputWithContext(context.Background()) } func (i *OutputFunction) ToOutputFunctionOutputWithContext(ctx context.Context) OutputFunctionOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputFunctionOutput) } // OutputFunctionArrayInput is an input type that accepts OutputFunctionArray and OutputFunctionArrayOutput values. // You can construct a concrete instance of `OutputFunctionArrayInput` via: // // OutputFunctionArray{ OutputFunctionArgs{...} } type OutputFunctionArrayInput interface { pulumi.Input ToOutputFunctionArrayOutput() OutputFunctionArrayOutput ToOutputFunctionArrayOutputWithContext(context.Context) OutputFunctionArrayOutput } type OutputFunctionArray []OutputFunctionInput func (OutputFunctionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputFunction)(nil)).Elem() } func (i OutputFunctionArray) ToOutputFunctionArrayOutput() OutputFunctionArrayOutput { return i.ToOutputFunctionArrayOutputWithContext(context.Background()) } func (i OutputFunctionArray) ToOutputFunctionArrayOutputWithContext(ctx context.Context) OutputFunctionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputFunctionArrayOutput) } // OutputFunctionMapInput is an input type that accepts OutputFunctionMap and OutputFunctionMapOutput values. // You can construct a concrete instance of `OutputFunctionMapInput` via: // // OutputFunctionMap{ "key": OutputFunctionArgs{...} } type OutputFunctionMapInput interface { pulumi.Input ToOutputFunctionMapOutput() OutputFunctionMapOutput ToOutputFunctionMapOutputWithContext(context.Context) OutputFunctionMapOutput } type OutputFunctionMap map[string]OutputFunctionInput func (OutputFunctionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputFunction)(nil)).Elem() } func (i OutputFunctionMap) ToOutputFunctionMapOutput() OutputFunctionMapOutput { return i.ToOutputFunctionMapOutputWithContext(context.Background()) } func (i OutputFunctionMap) ToOutputFunctionMapOutputWithContext(ctx context.Context) OutputFunctionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputFunctionMapOutput) } type OutputFunctionOutput struct{ *pulumi.OutputState } func (OutputFunctionOutput) ElementType() reflect.Type { return reflect.TypeOf((**OutputFunction)(nil)).Elem() } func (o OutputFunctionOutput) ToOutputFunctionOutput() OutputFunctionOutput { return o } func (o OutputFunctionOutput) ToOutputFunctionOutputWithContext(ctx context.Context) OutputFunctionOutput { return o } // The API key for the Function. func (o OutputFunctionOutput) ApiKey() pulumi.StringOutput { return o.ApplyT(func(v *OutputFunction) pulumi.StringOutput { return v.ApiKey }).(pulumi.StringOutput) } // The maximum number of events in each batch that's sent to the function. Defaults to `100`. func (o OutputFunctionOutput) BatchMaxCount() pulumi.IntPtrOutput { return o.ApplyT(func(v *OutputFunction) pulumi.IntPtrOutput { return v.BatchMaxCount }).(pulumi.IntPtrOutput) } // The maximum batch size in bytes that's sent to the function. Defaults to `262144` (256 kB). func (o OutputFunctionOutput) BatchMaxInBytes() pulumi.IntPtrOutput { return o.ApplyT(func(v *OutputFunction) pulumi.IntPtrOutput { return v.BatchMaxInBytes }).(pulumi.IntPtrOutput) } // The name of the Function App. func (o OutputFunctionOutput) FunctionApp() pulumi.StringOutput { return o.ApplyT(func(v *OutputFunction) pulumi.StringOutput { return v.FunctionApp }).(pulumi.StringOutput) } // The name of the function in the Function App. func (o OutputFunctionOutput) FunctionName() pulumi.StringOutput { return o.ApplyT(func(v *OutputFunction) pulumi.StringOutput { return v.FunctionName }).(pulumi.StringOutput) } // The name which should be used for this Stream Analytics Output. Changing this forces a new resource to be created. func (o OutputFunctionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *OutputFunction) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the Stream Analytics Output should exist. Changing this forces a new resource to be created. func (o OutputFunctionOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *OutputFunction) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The name of the Stream Analytics Job. Changing this forces a new resource to be created. func (o OutputFunctionOutput) StreamAnalyticsJobName() pulumi.StringOutput { return o.ApplyT(func(v *OutputFunction) pulumi.StringOutput { return v.StreamAnalyticsJobName }).(pulumi.StringOutput) } type OutputFunctionArrayOutput struct{ *pulumi.OutputState } func (OutputFunctionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputFunction)(nil)).Elem() } func (o OutputFunctionArrayOutput) ToOutputFunctionArrayOutput() OutputFunctionArrayOutput { return o } func (o OutputFunctionArrayOutput) ToOutputFunctionArrayOutputWithContext(ctx context.Context) OutputFunctionArrayOutput { return o } func (o OutputFunctionArrayOutput) Index(i pulumi.IntInput) OutputFunctionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *OutputFunction { return vs[0].([]*OutputFunction)[vs[1].(int)] }).(OutputFunctionOutput) } type OutputFunctionMapOutput struct{ *pulumi.OutputState } func (OutputFunctionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputFunction)(nil)).Elem() } func (o OutputFunctionMapOutput) ToOutputFunctionMapOutput() OutputFunctionMapOutput { return o } func (o OutputFunctionMapOutput) ToOutputFunctionMapOutputWithContext(ctx context.Context) OutputFunctionMapOutput { return o } func (o OutputFunctionMapOutput) MapIndex(k pulumi.StringInput) OutputFunctionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *OutputFunction { return vs[0].(map[string]*OutputFunction)[vs[1].(string)] }).(OutputFunctionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*OutputFunctionInput)(nil)).Elem(), &OutputFunction{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputFunctionArrayInput)(nil)).Elem(), OutputFunctionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputFunctionMapInput)(nil)).Elem(), OutputFunctionMap{}) pulumi.RegisterOutputType(OutputFunctionOutput{}) pulumi.RegisterOutputType(OutputFunctionArrayOutput{}) pulumi.RegisterOutputType(OutputFunctionMapOutput{}) }
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/streamanalytics/outputBlob.go
sdk/go/azure/streamanalytics/outputBlob.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Output to Blob Storage. // // ## 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "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("rg-example"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // example := streamanalytics.LookupJobOutput(ctx, streamanalytics.GetJobOutputArgs{ // Name: pulumi.String("example-job"), // ResourceGroupName: exampleResourceGroup.Name, // }, nil) // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplesa"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{ // Name: pulumi.String("example"), // StorageAccountName: exampleAccount.Name, // ContainerAccessType: pulumi.String("private"), // }) // if err != nil { // return err // } // _, err = streamanalytics.NewOutputBlob(ctx, "example", &streamanalytics.OutputBlobArgs{ // Name: pulumi.String("output-to-blob-storage"), // StreamAnalyticsJobName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.Name, nil // }).(pulumi.StringPtrOutput)), // ResourceGroupName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.ResourceGroupName, nil // }).(pulumi.StringPtrOutput)), // StorageAccountName: exampleAccount.Name, // StorageAccountKey: exampleAccount.PrimaryAccessKey, // StorageContainerName: exampleContainer.Name, // PathPattern: pulumi.String("some-pattern"), // DateFormat: pulumi.String("yyyy-MM-dd"), // TimeFormat: pulumi.String("HH"), // Serialization: &streamanalytics.OutputBlobSerializationArgs{ // Type: pulumi.String("Csv"), // Encoding: pulumi.String("UTF8"), // FieldDelimiter: pulumi.String(","), // }, // }) // 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.StreamAnalytics` - 2021-10-01-preview // // ## Import // // Stream Analytics Outputs to Blob Storage can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/outputBlob:OutputBlob example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/outputs/output1 // ``` type OutputBlob struct { pulumi.CustomResourceState // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrOutput `pulumi:"authenticationMode"` // The maximum wait time per batch in `hh:mm:ss` e.g. `00:02:00` for two minutes. BatchMaxWaitTime pulumi.StringPtrOutput `pulumi:"batchMaxWaitTime"` // The minimum number of rows per batch (must be between `0` and `1000000`). BatchMinRows pulumi.IntPtrOutput `pulumi:"batchMinRows"` // Determines whether blob blocks are either committed automatically or appended. Possible values are `Append` and `Once`. Defaults to `Append`. BlobWriteMode pulumi.StringPtrOutput `pulumi:"blobWriteMode"` // The date format. Wherever `{date}` appears in `pathPattern`, the value of this property is used as the date format instead. DateFormat pulumi.StringOutput `pulumi:"dateFormat"` // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. PathPattern pulumi.StringOutput `pulumi:"pathPattern"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization OutputBlobSerializationOutput `pulumi:"serialization"` // The Access Key which should be used to connect to this Storage Account. StorageAccountKey pulumi.StringPtrOutput `pulumi:"storageAccountKey"` // The name of the Storage Account. StorageAccountName pulumi.StringOutput `pulumi:"storageAccountName"` // The name of the Container within the Storage Account. StorageContainerName pulumi.StringOutput `pulumi:"storageContainerName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringOutput `pulumi:"streamAnalyticsJobName"` // The time format. Wherever `{time}` appears in `pathPattern`, the value of this property is used as the time format instead. TimeFormat pulumi.StringOutput `pulumi:"timeFormat"` } // NewOutputBlob registers a new resource with the given unique name, arguments, and options. func NewOutputBlob(ctx *pulumi.Context, name string, args *OutputBlobArgs, opts ...pulumi.ResourceOption) (*OutputBlob, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DateFormat == nil { return nil, errors.New("invalid value for required argument 'DateFormat'") } if args.PathPattern == nil { return nil, errors.New("invalid value for required argument 'PathPattern'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Serialization == nil { return nil, errors.New("invalid value for required argument 'Serialization'") } if args.StorageAccountName == nil { return nil, errors.New("invalid value for required argument 'StorageAccountName'") } if args.StorageContainerName == nil { return nil, errors.New("invalid value for required argument 'StorageContainerName'") } if args.StreamAnalyticsJobName == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobName'") } if args.TimeFormat == nil { return nil, errors.New("invalid value for required argument 'TimeFormat'") } if args.StorageAccountKey != nil { args.StorageAccountKey = pulumi.ToSecret(args.StorageAccountKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "storageAccountKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource OutputBlob err := ctx.RegisterResource("azure:streamanalytics/outputBlob:OutputBlob", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetOutputBlob gets an existing OutputBlob 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 GetOutputBlob(ctx *pulumi.Context, name string, id pulumi.IDInput, state *OutputBlobState, opts ...pulumi.ResourceOption) (*OutputBlob, error) { var resource OutputBlob err := ctx.ReadResource("azure:streamanalytics/outputBlob:OutputBlob", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering OutputBlob resources. type outputBlobState struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The maximum wait time per batch in `hh:mm:ss` e.g. `00:02:00` for two minutes. BatchMaxWaitTime *string `pulumi:"batchMaxWaitTime"` // The minimum number of rows per batch (must be between `0` and `1000000`). BatchMinRows *int `pulumi:"batchMinRows"` // Determines whether blob blocks are either committed automatically or appended. Possible values are `Append` and `Once`. Defaults to `Append`. BlobWriteMode *string `pulumi:"blobWriteMode"` // The date format. Wherever `{date}` appears in `pathPattern`, the value of this property is used as the date format instead. DateFormat *string `pulumi:"dateFormat"` // The name of the Stream Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. PathPattern *string `pulumi:"pathPattern"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization *OutputBlobSerialization `pulumi:"serialization"` // The Access Key which should be used to connect to this Storage Account. StorageAccountKey *string `pulumi:"storageAccountKey"` // The name of the Storage Account. StorageAccountName *string `pulumi:"storageAccountName"` // The name of the Container within the Storage Account. StorageContainerName *string `pulumi:"storageContainerName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName *string `pulumi:"streamAnalyticsJobName"` // The time format. Wherever `{time}` appears in `pathPattern`, the value of this property is used as the time format instead. TimeFormat *string `pulumi:"timeFormat"` } type OutputBlobState struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The maximum wait time per batch in `hh:mm:ss` e.g. `00:02:00` for two minutes. BatchMaxWaitTime pulumi.StringPtrInput // The minimum number of rows per batch (must be between `0` and `1000000`). BatchMinRows pulumi.IntPtrInput // Determines whether blob blocks are either committed automatically or appended. Possible values are `Append` and `Once`. Defaults to `Append`. BlobWriteMode pulumi.StringPtrInput // The date format. Wherever `{date}` appears in `pathPattern`, the value of this property is used as the date format instead. DateFormat pulumi.StringPtrInput // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. PathPattern pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `serialization` block as defined below. Serialization OutputBlobSerializationPtrInput // The Access Key which should be used to connect to this Storage Account. StorageAccountKey pulumi.StringPtrInput // The name of the Storage Account. StorageAccountName pulumi.StringPtrInput // The name of the Container within the Storage Account. StorageContainerName pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringPtrInput // The time format. Wherever `{time}` appears in `pathPattern`, the value of this property is used as the time format instead. TimeFormat pulumi.StringPtrInput } func (OutputBlobState) ElementType() reflect.Type { return reflect.TypeOf((*outputBlobState)(nil)).Elem() } type outputBlobArgs struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The maximum wait time per batch in `hh:mm:ss` e.g. `00:02:00` for two minutes. BatchMaxWaitTime *string `pulumi:"batchMaxWaitTime"` // The minimum number of rows per batch (must be between `0` and `1000000`). BatchMinRows *int `pulumi:"batchMinRows"` // Determines whether blob blocks are either committed automatically or appended. Possible values are `Append` and `Once`. Defaults to `Append`. BlobWriteMode *string `pulumi:"blobWriteMode"` // The date format. Wherever `{date}` appears in `pathPattern`, the value of this property is used as the date format instead. DateFormat string `pulumi:"dateFormat"` // The name of the Stream Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. PathPattern string `pulumi:"pathPattern"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization OutputBlobSerialization `pulumi:"serialization"` // The Access Key which should be used to connect to this Storage Account. StorageAccountKey *string `pulumi:"storageAccountKey"` // The name of the Storage Account. StorageAccountName string `pulumi:"storageAccountName"` // The name of the Container within the Storage Account. StorageContainerName string `pulumi:"storageContainerName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName string `pulumi:"streamAnalyticsJobName"` // The time format. Wherever `{time}` appears in `pathPattern`, the value of this property is used as the time format instead. TimeFormat string `pulumi:"timeFormat"` } // The set of arguments for constructing a OutputBlob resource. type OutputBlobArgs struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The maximum wait time per batch in `hh:mm:ss` e.g. `00:02:00` for two minutes. BatchMaxWaitTime pulumi.StringPtrInput // The minimum number of rows per batch (must be between `0` and `1000000`). BatchMinRows pulumi.IntPtrInput // Determines whether blob blocks are either committed automatically or appended. Possible values are `Append` and `Once`. Defaults to `Append`. BlobWriteMode pulumi.StringPtrInput // The date format. Wherever `{date}` appears in `pathPattern`, the value of this property is used as the date format instead. DateFormat pulumi.StringInput // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. PathPattern pulumi.StringInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A `serialization` block as defined below. Serialization OutputBlobSerializationInput // The Access Key which should be used to connect to this Storage Account. StorageAccountKey pulumi.StringPtrInput // The name of the Storage Account. StorageAccountName pulumi.StringInput // The name of the Container within the Storage Account. StorageContainerName pulumi.StringInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringInput // The time format. Wherever `{time}` appears in `pathPattern`, the value of this property is used as the time format instead. TimeFormat pulumi.StringInput } func (OutputBlobArgs) ElementType() reflect.Type { return reflect.TypeOf((*outputBlobArgs)(nil)).Elem() } type OutputBlobInput interface { pulumi.Input ToOutputBlobOutput() OutputBlobOutput ToOutputBlobOutputWithContext(ctx context.Context) OutputBlobOutput } func (*OutputBlob) ElementType() reflect.Type { return reflect.TypeOf((**OutputBlob)(nil)).Elem() } func (i *OutputBlob) ToOutputBlobOutput() OutputBlobOutput { return i.ToOutputBlobOutputWithContext(context.Background()) } func (i *OutputBlob) ToOutputBlobOutputWithContext(ctx context.Context) OutputBlobOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputBlobOutput) } // OutputBlobArrayInput is an input type that accepts OutputBlobArray and OutputBlobArrayOutput values. // You can construct a concrete instance of `OutputBlobArrayInput` via: // // OutputBlobArray{ OutputBlobArgs{...} } type OutputBlobArrayInput interface { pulumi.Input ToOutputBlobArrayOutput() OutputBlobArrayOutput ToOutputBlobArrayOutputWithContext(context.Context) OutputBlobArrayOutput } type OutputBlobArray []OutputBlobInput func (OutputBlobArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputBlob)(nil)).Elem() } func (i OutputBlobArray) ToOutputBlobArrayOutput() OutputBlobArrayOutput { return i.ToOutputBlobArrayOutputWithContext(context.Background()) } func (i OutputBlobArray) ToOutputBlobArrayOutputWithContext(ctx context.Context) OutputBlobArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputBlobArrayOutput) } // OutputBlobMapInput is an input type that accepts OutputBlobMap and OutputBlobMapOutput values. // You can construct a concrete instance of `OutputBlobMapInput` via: // // OutputBlobMap{ "key": OutputBlobArgs{...} } type OutputBlobMapInput interface { pulumi.Input ToOutputBlobMapOutput() OutputBlobMapOutput ToOutputBlobMapOutputWithContext(context.Context) OutputBlobMapOutput } type OutputBlobMap map[string]OutputBlobInput func (OutputBlobMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputBlob)(nil)).Elem() } func (i OutputBlobMap) ToOutputBlobMapOutput() OutputBlobMapOutput { return i.ToOutputBlobMapOutputWithContext(context.Background()) } func (i OutputBlobMap) ToOutputBlobMapOutputWithContext(ctx context.Context) OutputBlobMapOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputBlobMapOutput) } type OutputBlobOutput struct{ *pulumi.OutputState } func (OutputBlobOutput) ElementType() reflect.Type { return reflect.TypeOf((**OutputBlob)(nil)).Elem() } func (o OutputBlobOutput) ToOutputBlobOutput() OutputBlobOutput { return o } func (o OutputBlobOutput) ToOutputBlobOutputWithContext(ctx context.Context) OutputBlobOutput { return o } // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. func (o OutputBlobOutput) AuthenticationMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputBlob) pulumi.StringPtrOutput { return v.AuthenticationMode }).(pulumi.StringPtrOutput) } // The maximum wait time per batch in `hh:mm:ss` e.g. `00:02:00` for two minutes. func (o OutputBlobOutput) BatchMaxWaitTime() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputBlob) pulumi.StringPtrOutput { return v.BatchMaxWaitTime }).(pulumi.StringPtrOutput) } // The minimum number of rows per batch (must be between `0` and `1000000`). func (o OutputBlobOutput) BatchMinRows() pulumi.IntPtrOutput { return o.ApplyT(func(v *OutputBlob) pulumi.IntPtrOutput { return v.BatchMinRows }).(pulumi.IntPtrOutput) } // Determines whether blob blocks are either committed automatically or appended. Possible values are `Append` and `Once`. Defaults to `Append`. func (o OutputBlobOutput) BlobWriteMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputBlob) pulumi.StringPtrOutput { return v.BlobWriteMode }).(pulumi.StringPtrOutput) } // The date format. Wherever `{date}` appears in `pathPattern`, the value of this property is used as the date format instead. func (o OutputBlobOutput) DateFormat() pulumi.StringOutput { return o.ApplyT(func(v *OutputBlob) pulumi.StringOutput { return v.DateFormat }).(pulumi.StringOutput) } // The name of the Stream Output. Changing this forces a new resource to be created. func (o OutputBlobOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *OutputBlob) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. func (o OutputBlobOutput) PathPattern() pulumi.StringOutput { return o.ApplyT(func(v *OutputBlob) pulumi.StringOutput { return v.PathPattern }).(pulumi.StringOutput) } // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. func (o OutputBlobOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *OutputBlob) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `serialization` block as defined below. func (o OutputBlobOutput) Serialization() OutputBlobSerializationOutput { return o.ApplyT(func(v *OutputBlob) OutputBlobSerializationOutput { return v.Serialization }).(OutputBlobSerializationOutput) } // The Access Key which should be used to connect to this Storage Account. func (o OutputBlobOutput) StorageAccountKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputBlob) pulumi.StringPtrOutput { return v.StorageAccountKey }).(pulumi.StringPtrOutput) } // The name of the Storage Account. func (o OutputBlobOutput) StorageAccountName() pulumi.StringOutput { return o.ApplyT(func(v *OutputBlob) pulumi.StringOutput { return v.StorageAccountName }).(pulumi.StringOutput) } // The name of the Container within the Storage Account. func (o OutputBlobOutput) StorageContainerName() pulumi.StringOutput { return o.ApplyT(func(v *OutputBlob) pulumi.StringOutput { return v.StorageContainerName }).(pulumi.StringOutput) } // The name of the Stream Analytics Job. Changing this forces a new resource to be created. func (o OutputBlobOutput) StreamAnalyticsJobName() pulumi.StringOutput { return o.ApplyT(func(v *OutputBlob) pulumi.StringOutput { return v.StreamAnalyticsJobName }).(pulumi.StringOutput) } // The time format. Wherever `{time}` appears in `pathPattern`, the value of this property is used as the time format instead. func (o OutputBlobOutput) TimeFormat() pulumi.StringOutput { return o.ApplyT(func(v *OutputBlob) pulumi.StringOutput { return v.TimeFormat }).(pulumi.StringOutput) } type OutputBlobArrayOutput struct{ *pulumi.OutputState } func (OutputBlobArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputBlob)(nil)).Elem() } func (o OutputBlobArrayOutput) ToOutputBlobArrayOutput() OutputBlobArrayOutput { return o } func (o OutputBlobArrayOutput) ToOutputBlobArrayOutputWithContext(ctx context.Context) OutputBlobArrayOutput { return o } func (o OutputBlobArrayOutput) Index(i pulumi.IntInput) OutputBlobOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *OutputBlob { return vs[0].([]*OutputBlob)[vs[1].(int)] }).(OutputBlobOutput) } type OutputBlobMapOutput struct{ *pulumi.OutputState } func (OutputBlobMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputBlob)(nil)).Elem() } func (o OutputBlobMapOutput) ToOutputBlobMapOutput() OutputBlobMapOutput { return o } func (o OutputBlobMapOutput) ToOutputBlobMapOutputWithContext(ctx context.Context) OutputBlobMapOutput { return o } func (o OutputBlobMapOutput) MapIndex(k pulumi.StringInput) OutputBlobOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *OutputBlob { return vs[0].(map[string]*OutputBlob)[vs[1].(string)] }).(OutputBlobOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*OutputBlobInput)(nil)).Elem(), &OutputBlob{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputBlobArrayInput)(nil)).Elem(), OutputBlobArray{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputBlobMapInput)(nil)).Elem(), OutputBlobMap{}) pulumi.RegisterOutputType(OutputBlobOutput{}) pulumi.RegisterOutputType(OutputBlobArrayOutput{}) pulumi.RegisterOutputType(OutputBlobMapOutput{}) }
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/streamanalytics/outputPowerbi.go
sdk/go/azure/streamanalytics/outputPowerbi.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Output powerBI. // // ## 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/streamanalytics" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.LookupResourceGroup(ctx, &core.LookupResourceGroupArgs{ // Name: "example-resources", // }, nil) // if err != nil { // return err // } // exampleGetJob, err := streamanalytics.LookupJob(ctx, &streamanalytics.LookupJobArgs{ // Name: "example-job", // ResourceGroupName: example.Name, // }, nil) // if err != nil { // return err // } // _, err = streamanalytics.NewOutputPowerbi(ctx, "example", &streamanalytics.OutputPowerbiArgs{ // Name: pulumi.String("output-to-powerbi"), // StreamAnalyticsJobId: pulumi.String(exampleGetJob.Id), // Dataset: pulumi.String("example-dataset"), // Table: pulumi.String("example-table"), // GroupId: pulumi.String("00000000-0000-0000-0000-000000000000"), // GroupName: pulumi.String("some-group-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.StreamAnalytics` - 2021-10-01-preview // // ## Import // // Stream Analytics Output to Power BI can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/outputPowerbi:OutputPowerbi example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/outputs/output1 // ``` type OutputPowerbi struct { pulumi.CustomResourceState // The name of the Power BI dataset. Dataset pulumi.StringOutput `pulumi:"dataset"` // The ID of the Power BI group, this must be a valid UUID. GroupId pulumi.StringOutput `pulumi:"groupId"` // The name of the Power BI group. Use this property to help remember which specific Power BI group id was used. GroupName pulumi.StringOutput `pulumi:"groupName"` // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId pulumi.StringOutput `pulumi:"streamAnalyticsJobId"` // The name of the Power BI table under the specified dataset. Table pulumi.StringOutput `pulumi:"table"` // The user display name of the user that was used to obtain the refresh token. TokenUserDisplayName pulumi.StringPtrOutput `pulumi:"tokenUserDisplayName"` // The user principal name (UPN) of the user that was used to obtain the refresh token. TokenUserPrincipalName pulumi.StringPtrOutput `pulumi:"tokenUserPrincipalName"` } // NewOutputPowerbi registers a new resource with the given unique name, arguments, and options. func NewOutputPowerbi(ctx *pulumi.Context, name string, args *OutputPowerbiArgs, opts ...pulumi.ResourceOption) (*OutputPowerbi, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Dataset == nil { return nil, errors.New("invalid value for required argument 'Dataset'") } if args.GroupId == nil { return nil, errors.New("invalid value for required argument 'GroupId'") } if args.GroupName == nil { return nil, errors.New("invalid value for required argument 'GroupName'") } if args.StreamAnalyticsJobId == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobId'") } if args.Table == nil { return nil, errors.New("invalid value for required argument 'Table'") } opts = internal.PkgResourceDefaultOpts(opts) var resource OutputPowerbi err := ctx.RegisterResource("azure:streamanalytics/outputPowerbi:OutputPowerbi", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetOutputPowerbi gets an existing OutputPowerbi 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 GetOutputPowerbi(ctx *pulumi.Context, name string, id pulumi.IDInput, state *OutputPowerbiState, opts ...pulumi.ResourceOption) (*OutputPowerbi, error) { var resource OutputPowerbi err := ctx.ReadResource("azure:streamanalytics/outputPowerbi:OutputPowerbi", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering OutputPowerbi resources. type outputPowerbiState struct { // The name of the Power BI dataset. Dataset *string `pulumi:"dataset"` // The ID of the Power BI group, this must be a valid UUID. GroupId *string `pulumi:"groupId"` // The name of the Power BI group. Use this property to help remember which specific Power BI group id was used. GroupName *string `pulumi:"groupName"` // The name of the Stream Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId *string `pulumi:"streamAnalyticsJobId"` // The name of the Power BI table under the specified dataset. Table *string `pulumi:"table"` // The user display name of the user that was used to obtain the refresh token. TokenUserDisplayName *string `pulumi:"tokenUserDisplayName"` // The user principal name (UPN) of the user that was used to obtain the refresh token. TokenUserPrincipalName *string `pulumi:"tokenUserPrincipalName"` } type OutputPowerbiState struct { // The name of the Power BI dataset. Dataset pulumi.StringPtrInput // The ID of the Power BI group, this must be a valid UUID. GroupId pulumi.StringPtrInput // The name of the Power BI group. Use this property to help remember which specific Power BI group id was used. GroupName pulumi.StringPtrInput // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId pulumi.StringPtrInput // The name of the Power BI table under the specified dataset. Table pulumi.StringPtrInput // The user display name of the user that was used to obtain the refresh token. TokenUserDisplayName pulumi.StringPtrInput // The user principal name (UPN) of the user that was used to obtain the refresh token. TokenUserPrincipalName pulumi.StringPtrInput } func (OutputPowerbiState) ElementType() reflect.Type { return reflect.TypeOf((*outputPowerbiState)(nil)).Elem() } type outputPowerbiArgs struct { // The name of the Power BI dataset. Dataset string `pulumi:"dataset"` // The ID of the Power BI group, this must be a valid UUID. GroupId string `pulumi:"groupId"` // The name of the Power BI group. Use this property to help remember which specific Power BI group id was used. GroupName string `pulumi:"groupName"` // The name of the Stream Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId string `pulumi:"streamAnalyticsJobId"` // The name of the Power BI table under the specified dataset. Table string `pulumi:"table"` // The user display name of the user that was used to obtain the refresh token. TokenUserDisplayName *string `pulumi:"tokenUserDisplayName"` // The user principal name (UPN) of the user that was used to obtain the refresh token. TokenUserPrincipalName *string `pulumi:"tokenUserPrincipalName"` } // The set of arguments for constructing a OutputPowerbi resource. type OutputPowerbiArgs struct { // The name of the Power BI dataset. Dataset pulumi.StringInput // The ID of the Power BI group, this must be a valid UUID. GroupId pulumi.StringInput // The name of the Power BI group. Use this property to help remember which specific Power BI group id was used. GroupName pulumi.StringInput // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId pulumi.StringInput // The name of the Power BI table under the specified dataset. Table pulumi.StringInput // The user display name of the user that was used to obtain the refresh token. TokenUserDisplayName pulumi.StringPtrInput // The user principal name (UPN) of the user that was used to obtain the refresh token. TokenUserPrincipalName pulumi.StringPtrInput } func (OutputPowerbiArgs) ElementType() reflect.Type { return reflect.TypeOf((*outputPowerbiArgs)(nil)).Elem() } type OutputPowerbiInput interface { pulumi.Input ToOutputPowerbiOutput() OutputPowerbiOutput ToOutputPowerbiOutputWithContext(ctx context.Context) OutputPowerbiOutput } func (*OutputPowerbi) ElementType() reflect.Type { return reflect.TypeOf((**OutputPowerbi)(nil)).Elem() } func (i *OutputPowerbi) ToOutputPowerbiOutput() OutputPowerbiOutput { return i.ToOutputPowerbiOutputWithContext(context.Background()) } func (i *OutputPowerbi) ToOutputPowerbiOutputWithContext(ctx context.Context) OutputPowerbiOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputPowerbiOutput) } // OutputPowerbiArrayInput is an input type that accepts OutputPowerbiArray and OutputPowerbiArrayOutput values. // You can construct a concrete instance of `OutputPowerbiArrayInput` via: // // OutputPowerbiArray{ OutputPowerbiArgs{...} } type OutputPowerbiArrayInput interface { pulumi.Input ToOutputPowerbiArrayOutput() OutputPowerbiArrayOutput ToOutputPowerbiArrayOutputWithContext(context.Context) OutputPowerbiArrayOutput } type OutputPowerbiArray []OutputPowerbiInput func (OutputPowerbiArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputPowerbi)(nil)).Elem() } func (i OutputPowerbiArray) ToOutputPowerbiArrayOutput() OutputPowerbiArrayOutput { return i.ToOutputPowerbiArrayOutputWithContext(context.Background()) } func (i OutputPowerbiArray) ToOutputPowerbiArrayOutputWithContext(ctx context.Context) OutputPowerbiArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputPowerbiArrayOutput) } // OutputPowerbiMapInput is an input type that accepts OutputPowerbiMap and OutputPowerbiMapOutput values. // You can construct a concrete instance of `OutputPowerbiMapInput` via: // // OutputPowerbiMap{ "key": OutputPowerbiArgs{...} } type OutputPowerbiMapInput interface { pulumi.Input ToOutputPowerbiMapOutput() OutputPowerbiMapOutput ToOutputPowerbiMapOutputWithContext(context.Context) OutputPowerbiMapOutput } type OutputPowerbiMap map[string]OutputPowerbiInput func (OutputPowerbiMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputPowerbi)(nil)).Elem() } func (i OutputPowerbiMap) ToOutputPowerbiMapOutput() OutputPowerbiMapOutput { return i.ToOutputPowerbiMapOutputWithContext(context.Background()) } func (i OutputPowerbiMap) ToOutputPowerbiMapOutputWithContext(ctx context.Context) OutputPowerbiMapOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputPowerbiMapOutput) } type OutputPowerbiOutput struct{ *pulumi.OutputState } func (OutputPowerbiOutput) ElementType() reflect.Type { return reflect.TypeOf((**OutputPowerbi)(nil)).Elem() } func (o OutputPowerbiOutput) ToOutputPowerbiOutput() OutputPowerbiOutput { return o } func (o OutputPowerbiOutput) ToOutputPowerbiOutputWithContext(ctx context.Context) OutputPowerbiOutput { return o } // The name of the Power BI dataset. func (o OutputPowerbiOutput) Dataset() pulumi.StringOutput { return o.ApplyT(func(v *OutputPowerbi) pulumi.StringOutput { return v.Dataset }).(pulumi.StringOutput) } // The ID of the Power BI group, this must be a valid UUID. func (o OutputPowerbiOutput) GroupId() pulumi.StringOutput { return o.ApplyT(func(v *OutputPowerbi) pulumi.StringOutput { return v.GroupId }).(pulumi.StringOutput) } // The name of the Power BI group. Use this property to help remember which specific Power BI group id was used. func (o OutputPowerbiOutput) GroupName() pulumi.StringOutput { return o.ApplyT(func(v *OutputPowerbi) pulumi.StringOutput { return v.GroupName }).(pulumi.StringOutput) } // The name of the Stream Output. Changing this forces a new resource to be created. func (o OutputPowerbiOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *OutputPowerbi) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Stream Analytics Job. Changing this forces a new resource to be created. func (o OutputPowerbiOutput) StreamAnalyticsJobId() pulumi.StringOutput { return o.ApplyT(func(v *OutputPowerbi) pulumi.StringOutput { return v.StreamAnalyticsJobId }).(pulumi.StringOutput) } // The name of the Power BI table under the specified dataset. func (o OutputPowerbiOutput) Table() pulumi.StringOutput { return o.ApplyT(func(v *OutputPowerbi) pulumi.StringOutput { return v.Table }).(pulumi.StringOutput) } // The user display name of the user that was used to obtain the refresh token. func (o OutputPowerbiOutput) TokenUserDisplayName() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputPowerbi) pulumi.StringPtrOutput { return v.TokenUserDisplayName }).(pulumi.StringPtrOutput) } // The user principal name (UPN) of the user that was used to obtain the refresh token. func (o OutputPowerbiOutput) TokenUserPrincipalName() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputPowerbi) pulumi.StringPtrOutput { return v.TokenUserPrincipalName }).(pulumi.StringPtrOutput) } type OutputPowerbiArrayOutput struct{ *pulumi.OutputState } func (OutputPowerbiArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputPowerbi)(nil)).Elem() } func (o OutputPowerbiArrayOutput) ToOutputPowerbiArrayOutput() OutputPowerbiArrayOutput { return o } func (o OutputPowerbiArrayOutput) ToOutputPowerbiArrayOutputWithContext(ctx context.Context) OutputPowerbiArrayOutput { return o } func (o OutputPowerbiArrayOutput) Index(i pulumi.IntInput) OutputPowerbiOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *OutputPowerbi { return vs[0].([]*OutputPowerbi)[vs[1].(int)] }).(OutputPowerbiOutput) } type OutputPowerbiMapOutput struct{ *pulumi.OutputState } func (OutputPowerbiMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputPowerbi)(nil)).Elem() } func (o OutputPowerbiMapOutput) ToOutputPowerbiMapOutput() OutputPowerbiMapOutput { return o } func (o OutputPowerbiMapOutput) ToOutputPowerbiMapOutputWithContext(ctx context.Context) OutputPowerbiMapOutput { return o } func (o OutputPowerbiMapOutput) MapIndex(k pulumi.StringInput) OutputPowerbiOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *OutputPowerbi { return vs[0].(map[string]*OutputPowerbi)[vs[1].(string)] }).(OutputPowerbiOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*OutputPowerbiInput)(nil)).Elem(), &OutputPowerbi{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputPowerbiArrayInput)(nil)).Elem(), OutputPowerbiArray{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputPowerbiMapInput)(nil)).Elem(), OutputPowerbiMap{}) pulumi.RegisterOutputType(OutputPowerbiOutput{}) pulumi.RegisterOutputType(OutputPowerbiArrayOutput{}) pulumi.RegisterOutputType(OutputPowerbiMapOutput{}) }
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/streamanalytics/outputMssql.go
sdk/go/azure/streamanalytics/outputMssql.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Output to Microsoft SQL Server Database. // // ## 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/mssql" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "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("rg-example"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // example := streamanalytics.LookupJobOutput(ctx, streamanalytics.GetJobOutputArgs{ // Name: pulumi.String("example-job"), // ResourceGroupName: exampleResourceGroup.Name, // }, nil) // exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{ // Name: pulumi.String("example-server"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // Version: pulumi.String("12.0"), // AdministratorLogin: pulumi.String("dbadmin"), // AdministratorLoginPassword: pulumi.String("example-password"), // }) // if err != nil { // return err // } // exampleDatabase, err := mssql.NewDatabase(ctx, "example", &mssql.DatabaseArgs{ // Name: pulumi.String("exampledb"), // ServerId: pulumi.Any(test.Id), // }) // if err != nil { // return err // } // _, err = streamanalytics.NewOutputMssql(ctx, "example", &streamanalytics.OutputMssqlArgs{ // Name: pulumi.String("example-output-sql"), // StreamAnalyticsJobName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.Name, nil // }).(pulumi.StringPtrOutput)), // ResourceGroupName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.ResourceGroupName, nil // }).(pulumi.StringPtrOutput)), // Server: exampleServer.FullyQualifiedDomainName, // User: exampleServer.AdministratorLogin, // Password: exampleServer.AdministratorLoginPassword, // Database: exampleDatabase.Name, // Table: pulumi.String("ExampleTable"), // }) // 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.StreamAnalytics` - 2021-10-01-preview // // ## Import // // Stream Analytics Outputs to Microsoft SQL Server Database can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/outputMssql:OutputMssql example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/outputs/output1 // ``` type OutputMssql struct { pulumi.CustomResourceState // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrOutput `pulumi:"authenticationMode"` // The MS SQL database name where the reference table exists. Changing this forces a new resource to be created. Database pulumi.StringOutput `pulumi:"database"` // The max batch count to write to the SQL Database. Defaults to `10000`. Possible values are between `1` and `1073741824`. MaxBatchCount pulumi.Float64PtrOutput `pulumi:"maxBatchCount"` // The max writer count for the SQL Database. Defaults to `1`. Possible values are `0` which bases the writer count on the query partition and `1` which corresponds to a single writer. MaxWriterCount pulumi.Float64PtrOutput `pulumi:"maxWriterCount"` // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Password used together with username, to login to the Microsoft SQL Server. Required if `authenticationMode` is `ConnectionString`. Password pulumi.StringPtrOutput `pulumi:"password"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The SQL server url. Changing this forces a new resource to be created. Server pulumi.StringOutput `pulumi:"server"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringOutput `pulumi:"streamAnalyticsJobName"` // Table in the database that the output points to. Changing this forces a new resource to be created. Table pulumi.StringOutput `pulumi:"table"` // Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created. Required if `authenticationMode` is `ConnectionString`. User pulumi.StringPtrOutput `pulumi:"user"` } // NewOutputMssql registers a new resource with the given unique name, arguments, and options. func NewOutputMssql(ctx *pulumi.Context, name string, args *OutputMssqlArgs, opts ...pulumi.ResourceOption) (*OutputMssql, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Database == nil { return nil, errors.New("invalid value for required argument 'Database'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Server == nil { return nil, errors.New("invalid value for required argument 'Server'") } if args.StreamAnalyticsJobName == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobName'") } if args.Table == nil { return nil, errors.New("invalid value for required argument 'Table'") } if args.Password != nil { args.Password = pulumi.ToSecret(args.Password).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "password", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource OutputMssql err := ctx.RegisterResource("azure:streamanalytics/outputMssql:OutputMssql", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetOutputMssql gets an existing OutputMssql 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 GetOutputMssql(ctx *pulumi.Context, name string, id pulumi.IDInput, state *OutputMssqlState, opts ...pulumi.ResourceOption) (*OutputMssql, error) { var resource OutputMssql err := ctx.ReadResource("azure:streamanalytics/outputMssql:OutputMssql", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering OutputMssql resources. type outputMssqlState struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The MS SQL database name where the reference table exists. Changing this forces a new resource to be created. Database *string `pulumi:"database"` // The max batch count to write to the SQL Database. Defaults to `10000`. Possible values are between `1` and `1073741824`. MaxBatchCount *float64 `pulumi:"maxBatchCount"` // The max writer count for the SQL Database. Defaults to `1`. Possible values are `0` which bases the writer count on the query partition and `1` which corresponds to a single writer. MaxWriterCount *float64 `pulumi:"maxWriterCount"` // The name of the Stream Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Password used together with username, to login to the Microsoft SQL Server. Required if `authenticationMode` is `ConnectionString`. Password *string `pulumi:"password"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The SQL server url. Changing this forces a new resource to be created. Server *string `pulumi:"server"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName *string `pulumi:"streamAnalyticsJobName"` // Table in the database that the output points to. Changing this forces a new resource to be created. Table *string `pulumi:"table"` // Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created. Required if `authenticationMode` is `ConnectionString`. User *string `pulumi:"user"` } type OutputMssqlState struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The MS SQL database name where the reference table exists. Changing this forces a new resource to be created. Database pulumi.StringPtrInput // The max batch count to write to the SQL Database. Defaults to `10000`. Possible values are between `1` and `1073741824`. MaxBatchCount pulumi.Float64PtrInput // The max writer count for the SQL Database. Defaults to `1`. Possible values are `0` which bases the writer count on the query partition and `1` which corresponds to a single writer. MaxWriterCount pulumi.Float64PtrInput // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Password used together with username, to login to the Microsoft SQL Server. Required if `authenticationMode` is `ConnectionString`. Password pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The SQL server url. Changing this forces a new resource to be created. Server pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringPtrInput // Table in the database that the output points to. Changing this forces a new resource to be created. Table pulumi.StringPtrInput // Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created. Required if `authenticationMode` is `ConnectionString`. User pulumi.StringPtrInput } func (OutputMssqlState) ElementType() reflect.Type { return reflect.TypeOf((*outputMssqlState)(nil)).Elem() } type outputMssqlArgs struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The MS SQL database name where the reference table exists. Changing this forces a new resource to be created. Database string `pulumi:"database"` // The max batch count to write to the SQL Database. Defaults to `10000`. Possible values are between `1` and `1073741824`. MaxBatchCount *float64 `pulumi:"maxBatchCount"` // The max writer count for the SQL Database. Defaults to `1`. Possible values are `0` which bases the writer count on the query partition and `1` which corresponds to a single writer. MaxWriterCount *float64 `pulumi:"maxWriterCount"` // The name of the Stream Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Password used together with username, to login to the Microsoft SQL Server. Required if `authenticationMode` is `ConnectionString`. Password *string `pulumi:"password"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The SQL server url. Changing this forces a new resource to be created. Server string `pulumi:"server"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName string `pulumi:"streamAnalyticsJobName"` // Table in the database that the output points to. Changing this forces a new resource to be created. Table string `pulumi:"table"` // Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created. Required if `authenticationMode` is `ConnectionString`. User *string `pulumi:"user"` } // The set of arguments for constructing a OutputMssql resource. type OutputMssqlArgs struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The MS SQL database name where the reference table exists. Changing this forces a new resource to be created. Database pulumi.StringInput // The max batch count to write to the SQL Database. Defaults to `10000`. Possible values are between `1` and `1073741824`. MaxBatchCount pulumi.Float64PtrInput // The max writer count for the SQL Database. Defaults to `1`. Possible values are `0` which bases the writer count on the query partition and `1` which corresponds to a single writer. MaxWriterCount pulumi.Float64PtrInput // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Password used together with username, to login to the Microsoft SQL Server. Required if `authenticationMode` is `ConnectionString`. Password pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The SQL server url. Changing this forces a new resource to be created. Server pulumi.StringInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringInput // Table in the database that the output points to. Changing this forces a new resource to be created. Table pulumi.StringInput // Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created. Required if `authenticationMode` is `ConnectionString`. User pulumi.StringPtrInput } func (OutputMssqlArgs) ElementType() reflect.Type { return reflect.TypeOf((*outputMssqlArgs)(nil)).Elem() } type OutputMssqlInput interface { pulumi.Input ToOutputMssqlOutput() OutputMssqlOutput ToOutputMssqlOutputWithContext(ctx context.Context) OutputMssqlOutput } func (*OutputMssql) ElementType() reflect.Type { return reflect.TypeOf((**OutputMssql)(nil)).Elem() } func (i *OutputMssql) ToOutputMssqlOutput() OutputMssqlOutput { return i.ToOutputMssqlOutputWithContext(context.Background()) } func (i *OutputMssql) ToOutputMssqlOutputWithContext(ctx context.Context) OutputMssqlOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputMssqlOutput) } // OutputMssqlArrayInput is an input type that accepts OutputMssqlArray and OutputMssqlArrayOutput values. // You can construct a concrete instance of `OutputMssqlArrayInput` via: // // OutputMssqlArray{ OutputMssqlArgs{...} } type OutputMssqlArrayInput interface { pulumi.Input ToOutputMssqlArrayOutput() OutputMssqlArrayOutput ToOutputMssqlArrayOutputWithContext(context.Context) OutputMssqlArrayOutput } type OutputMssqlArray []OutputMssqlInput func (OutputMssqlArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputMssql)(nil)).Elem() } func (i OutputMssqlArray) ToOutputMssqlArrayOutput() OutputMssqlArrayOutput { return i.ToOutputMssqlArrayOutputWithContext(context.Background()) } func (i OutputMssqlArray) ToOutputMssqlArrayOutputWithContext(ctx context.Context) OutputMssqlArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputMssqlArrayOutput) } // OutputMssqlMapInput is an input type that accepts OutputMssqlMap and OutputMssqlMapOutput values. // You can construct a concrete instance of `OutputMssqlMapInput` via: // // OutputMssqlMap{ "key": OutputMssqlArgs{...} } type OutputMssqlMapInput interface { pulumi.Input ToOutputMssqlMapOutput() OutputMssqlMapOutput ToOutputMssqlMapOutputWithContext(context.Context) OutputMssqlMapOutput } type OutputMssqlMap map[string]OutputMssqlInput func (OutputMssqlMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputMssql)(nil)).Elem() } func (i OutputMssqlMap) ToOutputMssqlMapOutput() OutputMssqlMapOutput { return i.ToOutputMssqlMapOutputWithContext(context.Background()) } func (i OutputMssqlMap) ToOutputMssqlMapOutputWithContext(ctx context.Context) OutputMssqlMapOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputMssqlMapOutput) } type OutputMssqlOutput struct{ *pulumi.OutputState } func (OutputMssqlOutput) ElementType() reflect.Type { return reflect.TypeOf((**OutputMssql)(nil)).Elem() } func (o OutputMssqlOutput) ToOutputMssqlOutput() OutputMssqlOutput { return o } func (o OutputMssqlOutput) ToOutputMssqlOutputWithContext(ctx context.Context) OutputMssqlOutput { return o } // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. func (o OutputMssqlOutput) AuthenticationMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputMssql) pulumi.StringPtrOutput { return v.AuthenticationMode }).(pulumi.StringPtrOutput) } // The MS SQL database name where the reference table exists. Changing this forces a new resource to be created. func (o OutputMssqlOutput) Database() pulumi.StringOutput { return o.ApplyT(func(v *OutputMssql) pulumi.StringOutput { return v.Database }).(pulumi.StringOutput) } // The max batch count to write to the SQL Database. Defaults to `10000`. Possible values are between `1` and `1073741824`. func (o OutputMssqlOutput) MaxBatchCount() pulumi.Float64PtrOutput { return o.ApplyT(func(v *OutputMssql) pulumi.Float64PtrOutput { return v.MaxBatchCount }).(pulumi.Float64PtrOutput) } // The max writer count for the SQL Database. Defaults to `1`. Possible values are `0` which bases the writer count on the query partition and `1` which corresponds to a single writer. func (o OutputMssqlOutput) MaxWriterCount() pulumi.Float64PtrOutput { return o.ApplyT(func(v *OutputMssql) pulumi.Float64PtrOutput { return v.MaxWriterCount }).(pulumi.Float64PtrOutput) } // The name of the Stream Output. Changing this forces a new resource to be created. func (o OutputMssqlOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *OutputMssql) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Password used together with username, to login to the Microsoft SQL Server. Required if `authenticationMode` is `ConnectionString`. func (o OutputMssqlOutput) Password() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputMssql) pulumi.StringPtrOutput { return v.Password }).(pulumi.StringPtrOutput) } // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. func (o OutputMssqlOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *OutputMssql) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The SQL server url. Changing this forces a new resource to be created. func (o OutputMssqlOutput) Server() pulumi.StringOutput { return o.ApplyT(func(v *OutputMssql) pulumi.StringOutput { return v.Server }).(pulumi.StringOutput) } // The name of the Stream Analytics Job. Changing this forces a new resource to be created. func (o OutputMssqlOutput) StreamAnalyticsJobName() pulumi.StringOutput { return o.ApplyT(func(v *OutputMssql) pulumi.StringOutput { return v.StreamAnalyticsJobName }).(pulumi.StringOutput) } // Table in the database that the output points to. Changing this forces a new resource to be created. func (o OutputMssqlOutput) Table() pulumi.StringOutput { return o.ApplyT(func(v *OutputMssql) pulumi.StringOutput { return v.Table }).(pulumi.StringOutput) } // Username used to login to the Microsoft SQL Server. Changing this forces a new resource to be created. Required if `authenticationMode` is `ConnectionString`. func (o OutputMssqlOutput) User() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputMssql) pulumi.StringPtrOutput { return v.User }).(pulumi.StringPtrOutput) } type OutputMssqlArrayOutput struct{ *pulumi.OutputState } func (OutputMssqlArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputMssql)(nil)).Elem() } func (o OutputMssqlArrayOutput) ToOutputMssqlArrayOutput() OutputMssqlArrayOutput { return o } func (o OutputMssqlArrayOutput) ToOutputMssqlArrayOutputWithContext(ctx context.Context) OutputMssqlArrayOutput { return o } func (o OutputMssqlArrayOutput) Index(i pulumi.IntInput) OutputMssqlOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *OutputMssql { return vs[0].([]*OutputMssql)[vs[1].(int)] }).(OutputMssqlOutput) } type OutputMssqlMapOutput struct{ *pulumi.OutputState } func (OutputMssqlMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputMssql)(nil)).Elem() } func (o OutputMssqlMapOutput) ToOutputMssqlMapOutput() OutputMssqlMapOutput { return o } func (o OutputMssqlMapOutput) ToOutputMssqlMapOutputWithContext(ctx context.Context) OutputMssqlMapOutput { return o } func (o OutputMssqlMapOutput) MapIndex(k pulumi.StringInput) OutputMssqlOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *OutputMssql { return vs[0].(map[string]*OutputMssql)[vs[1].(string)] }).(OutputMssqlOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*OutputMssqlInput)(nil)).Elem(), &OutputMssql{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputMssqlArrayInput)(nil)).Elem(), OutputMssqlArray{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputMssqlMapInput)(nil)).Elem(), OutputMssqlMap{}) pulumi.RegisterOutputType(OutputMssqlOutput{}) pulumi.RegisterOutputType(OutputMssqlArrayOutput{}) pulumi.RegisterOutputType(OutputMssqlMapOutput{}) }
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/streamanalytics/functionJavaScriptUDF.go
sdk/go/azure/streamanalytics/functionJavaScriptUDF.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a JavaScript UDF Function within Stream Analytics Streaming Job. // // ## 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/streamanalytics" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.LookupResourceGroup(ctx, &core.LookupResourceGroupArgs{ // Name: "example-resources", // }, nil) // if err != nil { // return err // } // exampleGetJob, err := streamanalytics.LookupJob(ctx, &streamanalytics.LookupJobArgs{ // Name: "example-job", // ResourceGroupName: example.Name, // }, nil) // if err != nil { // return err // } // _, err = streamanalytics.NewFunctionJavaScriptUDF(ctx, "example", &streamanalytics.FunctionJavaScriptUDFArgs{ // Name: pulumi.String("example-javascript-function"), // StreamAnalyticsJobName: pulumi.String(exampleGetJob.Name), // ResourceGroupName: pulumi.String(exampleGetJob.ResourceGroupName), // Script: pulumi.String("function getRandomNumber(in) {\n return in;\n}\n"), // Inputs: streamanalytics.FunctionJavaScriptUDFInputTypeArray{ // &streamanalytics.FunctionJavaScriptUDFInputTypeArgs{ // Type: pulumi.String("bigint"), // }, // }, // Output: &streamanalytics.FunctionJavaScriptUDFOutputTypeArgs{ // Type: pulumi.String("bigint"), // }, // }) // 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.StreamAnalytics` - 2020-03-01 // // ## Import // // Stream Analytics JavaScript UDF Functions can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/functionJavaScriptUDF:FunctionJavaScriptUDF example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/functions/func1 // ``` type FunctionJavaScriptUDF struct { pulumi.CustomResourceState // One or more `input` blocks as defined below. Inputs FunctionJavaScriptUDFInputTypeArrayOutput `pulumi:"inputs"` // The name of the JavaScript UDF Function. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // An `output` blocks as defined below. Output FunctionJavaScriptUDFOutputTypeOutput `pulumi:"output"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The JavaScript of this UDF Function. Script pulumi.StringOutput `pulumi:"script"` // The name of the Stream Analytics Job where this Function should be created. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringOutput `pulumi:"streamAnalyticsJobName"` } // NewFunctionJavaScriptUDF registers a new resource with the given unique name, arguments, and options. func NewFunctionJavaScriptUDF(ctx *pulumi.Context, name string, args *FunctionJavaScriptUDFArgs, opts ...pulumi.ResourceOption) (*FunctionJavaScriptUDF, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Inputs == nil { return nil, errors.New("invalid value for required argument 'Inputs'") } if args.Output == nil { return nil, errors.New("invalid value for required argument 'Output'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Script == nil { return nil, errors.New("invalid value for required argument 'Script'") } if args.StreamAnalyticsJobName == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FunctionJavaScriptUDF err := ctx.RegisterResource("azure:streamanalytics/functionJavaScriptUDF:FunctionJavaScriptUDF", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFunctionJavaScriptUDF gets an existing FunctionJavaScriptUDF 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 GetFunctionJavaScriptUDF(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FunctionJavaScriptUDFState, opts ...pulumi.ResourceOption) (*FunctionJavaScriptUDF, error) { var resource FunctionJavaScriptUDF err := ctx.ReadResource("azure:streamanalytics/functionJavaScriptUDF:FunctionJavaScriptUDF", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FunctionJavaScriptUDF resources. type functionJavaScriptUDFState struct { // One or more `input` blocks as defined below. Inputs []FunctionJavaScriptUDFInputType `pulumi:"inputs"` // The name of the JavaScript UDF Function. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // An `output` blocks as defined below. Output *FunctionJavaScriptUDFOutputType `pulumi:"output"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The JavaScript of this UDF Function. Script *string `pulumi:"script"` // The name of the Stream Analytics Job where this Function should be created. Changing this forces a new resource to be created. StreamAnalyticsJobName *string `pulumi:"streamAnalyticsJobName"` } type FunctionJavaScriptUDFState struct { // One or more `input` blocks as defined below. Inputs FunctionJavaScriptUDFInputTypeArrayInput // The name of the JavaScript UDF Function. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // An `output` blocks as defined below. Output FunctionJavaScriptUDFOutputTypePtrInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The JavaScript of this UDF Function. Script pulumi.StringPtrInput // The name of the Stream Analytics Job where this Function should be created. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringPtrInput } func (FunctionJavaScriptUDFState) ElementType() reflect.Type { return reflect.TypeOf((*functionJavaScriptUDFState)(nil)).Elem() } type functionJavaScriptUDFArgs struct { // One or more `input` blocks as defined below. Inputs []FunctionJavaScriptUDFInputType `pulumi:"inputs"` // The name of the JavaScript UDF Function. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // An `output` blocks as defined below. Output FunctionJavaScriptUDFOutputType `pulumi:"output"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The JavaScript of this UDF Function. Script string `pulumi:"script"` // The name of the Stream Analytics Job where this Function should be created. Changing this forces a new resource to be created. StreamAnalyticsJobName string `pulumi:"streamAnalyticsJobName"` } // The set of arguments for constructing a FunctionJavaScriptUDF resource. type FunctionJavaScriptUDFArgs struct { // One or more `input` blocks as defined below. Inputs FunctionJavaScriptUDFInputTypeArrayInput // The name of the JavaScript UDF Function. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // An `output` blocks as defined below. Output FunctionJavaScriptUDFOutputTypeInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The JavaScript of this UDF Function. Script pulumi.StringInput // The name of the Stream Analytics Job where this Function should be created. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringInput } func (FunctionJavaScriptUDFArgs) ElementType() reflect.Type { return reflect.TypeOf((*functionJavaScriptUDFArgs)(nil)).Elem() } type FunctionJavaScriptUDFInput interface { pulumi.Input ToFunctionJavaScriptUDFOutput() FunctionJavaScriptUDFOutput ToFunctionJavaScriptUDFOutputWithContext(ctx context.Context) FunctionJavaScriptUDFOutput } func (*FunctionJavaScriptUDF) ElementType() reflect.Type { return reflect.TypeOf((**FunctionJavaScriptUDF)(nil)).Elem() } func (i *FunctionJavaScriptUDF) ToFunctionJavaScriptUDFOutput() FunctionJavaScriptUDFOutput { return i.ToFunctionJavaScriptUDFOutputWithContext(context.Background()) } func (i *FunctionJavaScriptUDF) ToFunctionJavaScriptUDFOutputWithContext(ctx context.Context) FunctionJavaScriptUDFOutput { return pulumi.ToOutputWithContext(ctx, i).(FunctionJavaScriptUDFOutput) } // FunctionJavaScriptUDFArrayInput is an input type that accepts FunctionJavaScriptUDFArray and FunctionJavaScriptUDFArrayOutput values. // You can construct a concrete instance of `FunctionJavaScriptUDFArrayInput` via: // // FunctionJavaScriptUDFArray{ FunctionJavaScriptUDFArgs{...} } type FunctionJavaScriptUDFArrayInput interface { pulumi.Input ToFunctionJavaScriptUDFArrayOutput() FunctionJavaScriptUDFArrayOutput ToFunctionJavaScriptUDFArrayOutputWithContext(context.Context) FunctionJavaScriptUDFArrayOutput } type FunctionJavaScriptUDFArray []FunctionJavaScriptUDFInput func (FunctionJavaScriptUDFArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FunctionJavaScriptUDF)(nil)).Elem() } func (i FunctionJavaScriptUDFArray) ToFunctionJavaScriptUDFArrayOutput() FunctionJavaScriptUDFArrayOutput { return i.ToFunctionJavaScriptUDFArrayOutputWithContext(context.Background()) } func (i FunctionJavaScriptUDFArray) ToFunctionJavaScriptUDFArrayOutputWithContext(ctx context.Context) FunctionJavaScriptUDFArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FunctionJavaScriptUDFArrayOutput) } // FunctionJavaScriptUDFMapInput is an input type that accepts FunctionJavaScriptUDFMap and FunctionJavaScriptUDFMapOutput values. // You can construct a concrete instance of `FunctionJavaScriptUDFMapInput` via: // // FunctionJavaScriptUDFMap{ "key": FunctionJavaScriptUDFArgs{...} } type FunctionJavaScriptUDFMapInput interface { pulumi.Input ToFunctionJavaScriptUDFMapOutput() FunctionJavaScriptUDFMapOutput ToFunctionJavaScriptUDFMapOutputWithContext(context.Context) FunctionJavaScriptUDFMapOutput } type FunctionJavaScriptUDFMap map[string]FunctionJavaScriptUDFInput func (FunctionJavaScriptUDFMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FunctionJavaScriptUDF)(nil)).Elem() } func (i FunctionJavaScriptUDFMap) ToFunctionJavaScriptUDFMapOutput() FunctionJavaScriptUDFMapOutput { return i.ToFunctionJavaScriptUDFMapOutputWithContext(context.Background()) } func (i FunctionJavaScriptUDFMap) ToFunctionJavaScriptUDFMapOutputWithContext(ctx context.Context) FunctionJavaScriptUDFMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FunctionJavaScriptUDFMapOutput) } type FunctionJavaScriptUDFOutput struct{ *pulumi.OutputState } func (FunctionJavaScriptUDFOutput) ElementType() reflect.Type { return reflect.TypeOf((**FunctionJavaScriptUDF)(nil)).Elem() } func (o FunctionJavaScriptUDFOutput) ToFunctionJavaScriptUDFOutput() FunctionJavaScriptUDFOutput { return o } func (o FunctionJavaScriptUDFOutput) ToFunctionJavaScriptUDFOutputWithContext(ctx context.Context) FunctionJavaScriptUDFOutput { return o } // One or more `input` blocks as defined below. func (o FunctionJavaScriptUDFOutput) Inputs() FunctionJavaScriptUDFInputTypeArrayOutput { return o.ApplyT(func(v *FunctionJavaScriptUDF) FunctionJavaScriptUDFInputTypeArrayOutput { return v.Inputs }).(FunctionJavaScriptUDFInputTypeArrayOutput) } // The name of the JavaScript UDF Function. Changing this forces a new resource to be created. func (o FunctionJavaScriptUDFOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FunctionJavaScriptUDF) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // An `output` blocks as defined below. func (o FunctionJavaScriptUDFOutput) Output() FunctionJavaScriptUDFOutputTypeOutput { return o.ApplyT(func(v *FunctionJavaScriptUDF) FunctionJavaScriptUDFOutputTypeOutput { return v.Output }).(FunctionJavaScriptUDFOutputTypeOutput) } // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. func (o FunctionJavaScriptUDFOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *FunctionJavaScriptUDF) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The JavaScript of this UDF Function. func (o FunctionJavaScriptUDFOutput) Script() pulumi.StringOutput { return o.ApplyT(func(v *FunctionJavaScriptUDF) pulumi.StringOutput { return v.Script }).(pulumi.StringOutput) } // The name of the Stream Analytics Job where this Function should be created. Changing this forces a new resource to be created. func (o FunctionJavaScriptUDFOutput) StreamAnalyticsJobName() pulumi.StringOutput { return o.ApplyT(func(v *FunctionJavaScriptUDF) pulumi.StringOutput { return v.StreamAnalyticsJobName }).(pulumi.StringOutput) } type FunctionJavaScriptUDFArrayOutput struct{ *pulumi.OutputState } func (FunctionJavaScriptUDFArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FunctionJavaScriptUDF)(nil)).Elem() } func (o FunctionJavaScriptUDFArrayOutput) ToFunctionJavaScriptUDFArrayOutput() FunctionJavaScriptUDFArrayOutput { return o } func (o FunctionJavaScriptUDFArrayOutput) ToFunctionJavaScriptUDFArrayOutputWithContext(ctx context.Context) FunctionJavaScriptUDFArrayOutput { return o } func (o FunctionJavaScriptUDFArrayOutput) Index(i pulumi.IntInput) FunctionJavaScriptUDFOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FunctionJavaScriptUDF { return vs[0].([]*FunctionJavaScriptUDF)[vs[1].(int)] }).(FunctionJavaScriptUDFOutput) } type FunctionJavaScriptUDFMapOutput struct{ *pulumi.OutputState } func (FunctionJavaScriptUDFMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FunctionJavaScriptUDF)(nil)).Elem() } func (o FunctionJavaScriptUDFMapOutput) ToFunctionJavaScriptUDFMapOutput() FunctionJavaScriptUDFMapOutput { return o } func (o FunctionJavaScriptUDFMapOutput) ToFunctionJavaScriptUDFMapOutputWithContext(ctx context.Context) FunctionJavaScriptUDFMapOutput { return o } func (o FunctionJavaScriptUDFMapOutput) MapIndex(k pulumi.StringInput) FunctionJavaScriptUDFOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FunctionJavaScriptUDF { return vs[0].(map[string]*FunctionJavaScriptUDF)[vs[1].(string)] }).(FunctionJavaScriptUDFOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FunctionJavaScriptUDFInput)(nil)).Elem(), &FunctionJavaScriptUDF{}) pulumi.RegisterInputType(reflect.TypeOf((*FunctionJavaScriptUDFArrayInput)(nil)).Elem(), FunctionJavaScriptUDFArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FunctionJavaScriptUDFMapInput)(nil)).Elem(), FunctionJavaScriptUDFMap{}) pulumi.RegisterOutputType(FunctionJavaScriptUDFOutput{}) pulumi.RegisterOutputType(FunctionJavaScriptUDFArrayOutput{}) pulumi.RegisterOutputType(FunctionJavaScriptUDFMapOutput{}) }
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/streamanalytics/streamInputIotHub.go
sdk/go/azure/streamanalytics/streamInputIotHub.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Stream Input IoTHub. // // ## 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/iot" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "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 // } // example := streamanalytics.LookupJobOutput(ctx, streamanalytics.GetJobOutputArgs{ // Name: pulumi.String("example-job"), // ResourceGroupName: exampleResourceGroup.Name, // }, nil) // exampleIoTHub, err := iot.NewIoTHub(ctx, "example", &iot.IoTHubArgs{ // Name: pulumi.String("example-iothub"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // Sku: &iot.IoTHubSkuArgs{ // Name: pulumi.String("S1"), // Capacity: pulumi.Int(1), // }, // }) // if err != nil { // return err // } // _, err = streamanalytics.NewStreamInputIotHub(ctx, "example", &streamanalytics.StreamInputIotHubArgs{ // Name: pulumi.String("example-iothub-input"), // StreamAnalyticsJobName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.Name, nil // }).(pulumi.StringPtrOutput)), // ResourceGroupName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.ResourceGroupName, nil // }).(pulumi.StringPtrOutput)), // Endpoint: pulumi.String("messages/events"), // EventhubConsumerGroupName: pulumi.String("$Default"), // IothubNamespace: exampleIoTHub.Name, // SharedAccessPolicyKey: pulumi.String(exampleIoTHub.SharedAccessPolicies.ApplyT(func(sharedAccessPolicies []iot.IoTHubSharedAccessPolicy) (*string, error) { // return &sharedAccessPolicies[0].PrimaryKey, nil // }).(pulumi.StringPtrOutput)), // SharedAccessPolicyName: pulumi.String("iothubowner"), // Serialization: &streamanalytics.StreamInputIotHubSerializationArgs{ // Type: pulumi.String("Json"), // Encoding: pulumi.String("UTF8"), // }, // }) // 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.StreamAnalytics` - 2020-03-01 // // ## Import // // Stream Analytics Stream Input IoTHub's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/streamInputIotHub:StreamInputIotHub example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/inputs/input1 // ``` type StreamInputIotHub struct { pulumi.CustomResourceState // The IoT Hub endpoint to connect to (ie. messages/events, messages/operationsMonitoringEvents, etc.). Endpoint pulumi.StringOutput `pulumi:"endpoint"` // The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. EventhubConsumerGroupName pulumi.StringOutput `pulumi:"eventhubConsumerGroupName"` // The name or the URI of the IoT Hub. IothubNamespace pulumi.StringOutput `pulumi:"iothubNamespace"` // The name of the Stream Input IoTHub. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization StreamInputIotHubSerializationOutput `pulumi:"serialization"` // The shared access policy key for the specified shared access policy. Changing this forces a new resource to be created. SharedAccessPolicyKey pulumi.StringOutput `pulumi:"sharedAccessPolicyKey"` // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. SharedAccessPolicyName pulumi.StringOutput `pulumi:"sharedAccessPolicyName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringOutput `pulumi:"streamAnalyticsJobName"` } // NewStreamInputIotHub registers a new resource with the given unique name, arguments, and options. func NewStreamInputIotHub(ctx *pulumi.Context, name string, args *StreamInputIotHubArgs, opts ...pulumi.ResourceOption) (*StreamInputIotHub, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Endpoint == nil { return nil, errors.New("invalid value for required argument 'Endpoint'") } if args.EventhubConsumerGroupName == nil { return nil, errors.New("invalid value for required argument 'EventhubConsumerGroupName'") } if args.IothubNamespace == nil { return nil, errors.New("invalid value for required argument 'IothubNamespace'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Serialization == nil { return nil, errors.New("invalid value for required argument 'Serialization'") } if args.SharedAccessPolicyKey == nil { return nil, errors.New("invalid value for required argument 'SharedAccessPolicyKey'") } if args.SharedAccessPolicyName == nil { return nil, errors.New("invalid value for required argument 'SharedAccessPolicyName'") } if args.StreamAnalyticsJobName == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobName'") } if args.SharedAccessPolicyKey != nil { args.SharedAccessPolicyKey = pulumi.ToSecret(args.SharedAccessPolicyKey).(pulumi.StringInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "sharedAccessPolicyKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource StreamInputIotHub err := ctx.RegisterResource("azure:streamanalytics/streamInputIotHub:StreamInputIotHub", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetStreamInputIotHub gets an existing StreamInputIotHub 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 GetStreamInputIotHub(ctx *pulumi.Context, name string, id pulumi.IDInput, state *StreamInputIotHubState, opts ...pulumi.ResourceOption) (*StreamInputIotHub, error) { var resource StreamInputIotHub err := ctx.ReadResource("azure:streamanalytics/streamInputIotHub:StreamInputIotHub", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering StreamInputIotHub resources. type streamInputIotHubState struct { // The IoT Hub endpoint to connect to (ie. messages/events, messages/operationsMonitoringEvents, etc.). Endpoint *string `pulumi:"endpoint"` // The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. EventhubConsumerGroupName *string `pulumi:"eventhubConsumerGroupName"` // The name or the URI of the IoT Hub. IothubNamespace *string `pulumi:"iothubNamespace"` // The name of the Stream Input IoTHub. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization *StreamInputIotHubSerialization `pulumi:"serialization"` // The shared access policy key for the specified shared access policy. Changing this forces a new resource to be created. SharedAccessPolicyKey *string `pulumi:"sharedAccessPolicyKey"` // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. SharedAccessPolicyName *string `pulumi:"sharedAccessPolicyName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName *string `pulumi:"streamAnalyticsJobName"` } type StreamInputIotHubState struct { // The IoT Hub endpoint to connect to (ie. messages/events, messages/operationsMonitoringEvents, etc.). Endpoint pulumi.StringPtrInput // The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. EventhubConsumerGroupName pulumi.StringPtrInput // The name or the URI of the IoT Hub. IothubNamespace pulumi.StringPtrInput // The name of the Stream Input IoTHub. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `serialization` block as defined below. Serialization StreamInputIotHubSerializationPtrInput // The shared access policy key for the specified shared access policy. Changing this forces a new resource to be created. SharedAccessPolicyKey pulumi.StringPtrInput // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. SharedAccessPolicyName pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringPtrInput } func (StreamInputIotHubState) ElementType() reflect.Type { return reflect.TypeOf((*streamInputIotHubState)(nil)).Elem() } type streamInputIotHubArgs struct { // The IoT Hub endpoint to connect to (ie. messages/events, messages/operationsMonitoringEvents, etc.). Endpoint string `pulumi:"endpoint"` // The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. EventhubConsumerGroupName string `pulumi:"eventhubConsumerGroupName"` // The name or the URI of the IoT Hub. IothubNamespace string `pulumi:"iothubNamespace"` // The name of the Stream Input IoTHub. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization StreamInputIotHubSerialization `pulumi:"serialization"` // The shared access policy key for the specified shared access policy. Changing this forces a new resource to be created. SharedAccessPolicyKey string `pulumi:"sharedAccessPolicyKey"` // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. SharedAccessPolicyName string `pulumi:"sharedAccessPolicyName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName string `pulumi:"streamAnalyticsJobName"` } // The set of arguments for constructing a StreamInputIotHub resource. type StreamInputIotHubArgs struct { // The IoT Hub endpoint to connect to (ie. messages/events, messages/operationsMonitoringEvents, etc.). Endpoint pulumi.StringInput // The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. EventhubConsumerGroupName pulumi.StringInput // The name or the URI of the IoT Hub. IothubNamespace pulumi.StringInput // The name of the Stream Input IoTHub. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A `serialization` block as defined below. Serialization StreamInputIotHubSerializationInput // The shared access policy key for the specified shared access policy. Changing this forces a new resource to be created. SharedAccessPolicyKey pulumi.StringInput // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. SharedAccessPolicyName pulumi.StringInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringInput } func (StreamInputIotHubArgs) ElementType() reflect.Type { return reflect.TypeOf((*streamInputIotHubArgs)(nil)).Elem() } type StreamInputIotHubInput interface { pulumi.Input ToStreamInputIotHubOutput() StreamInputIotHubOutput ToStreamInputIotHubOutputWithContext(ctx context.Context) StreamInputIotHubOutput } func (*StreamInputIotHub) ElementType() reflect.Type { return reflect.TypeOf((**StreamInputIotHub)(nil)).Elem() } func (i *StreamInputIotHub) ToStreamInputIotHubOutput() StreamInputIotHubOutput { return i.ToStreamInputIotHubOutputWithContext(context.Background()) } func (i *StreamInputIotHub) ToStreamInputIotHubOutputWithContext(ctx context.Context) StreamInputIotHubOutput { return pulumi.ToOutputWithContext(ctx, i).(StreamInputIotHubOutput) } // StreamInputIotHubArrayInput is an input type that accepts StreamInputIotHubArray and StreamInputIotHubArrayOutput values. // You can construct a concrete instance of `StreamInputIotHubArrayInput` via: // // StreamInputIotHubArray{ StreamInputIotHubArgs{...} } type StreamInputIotHubArrayInput interface { pulumi.Input ToStreamInputIotHubArrayOutput() StreamInputIotHubArrayOutput ToStreamInputIotHubArrayOutputWithContext(context.Context) StreamInputIotHubArrayOutput } type StreamInputIotHubArray []StreamInputIotHubInput func (StreamInputIotHubArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*StreamInputIotHub)(nil)).Elem() } func (i StreamInputIotHubArray) ToStreamInputIotHubArrayOutput() StreamInputIotHubArrayOutput { return i.ToStreamInputIotHubArrayOutputWithContext(context.Background()) } func (i StreamInputIotHubArray) ToStreamInputIotHubArrayOutputWithContext(ctx context.Context) StreamInputIotHubArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(StreamInputIotHubArrayOutput) } // StreamInputIotHubMapInput is an input type that accepts StreamInputIotHubMap and StreamInputIotHubMapOutput values. // You can construct a concrete instance of `StreamInputIotHubMapInput` via: // // StreamInputIotHubMap{ "key": StreamInputIotHubArgs{...} } type StreamInputIotHubMapInput interface { pulumi.Input ToStreamInputIotHubMapOutput() StreamInputIotHubMapOutput ToStreamInputIotHubMapOutputWithContext(context.Context) StreamInputIotHubMapOutput } type StreamInputIotHubMap map[string]StreamInputIotHubInput func (StreamInputIotHubMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*StreamInputIotHub)(nil)).Elem() } func (i StreamInputIotHubMap) ToStreamInputIotHubMapOutput() StreamInputIotHubMapOutput { return i.ToStreamInputIotHubMapOutputWithContext(context.Background()) } func (i StreamInputIotHubMap) ToStreamInputIotHubMapOutputWithContext(ctx context.Context) StreamInputIotHubMapOutput { return pulumi.ToOutputWithContext(ctx, i).(StreamInputIotHubMapOutput) } type StreamInputIotHubOutput struct{ *pulumi.OutputState } func (StreamInputIotHubOutput) ElementType() reflect.Type { return reflect.TypeOf((**StreamInputIotHub)(nil)).Elem() } func (o StreamInputIotHubOutput) ToStreamInputIotHubOutput() StreamInputIotHubOutput { return o } func (o StreamInputIotHubOutput) ToStreamInputIotHubOutputWithContext(ctx context.Context) StreamInputIotHubOutput { return o } // The IoT Hub endpoint to connect to (ie. messages/events, messages/operationsMonitoringEvents, etc.). func (o StreamInputIotHubOutput) Endpoint() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputIotHub) pulumi.StringOutput { return v.Endpoint }).(pulumi.StringOutput) } // The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. func (o StreamInputIotHubOutput) EventhubConsumerGroupName() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputIotHub) pulumi.StringOutput { return v.EventhubConsumerGroupName }).(pulumi.StringOutput) } // The name or the URI of the IoT Hub. func (o StreamInputIotHubOutput) IothubNamespace() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputIotHub) pulumi.StringOutput { return v.IothubNamespace }).(pulumi.StringOutput) } // The name of the Stream Input IoTHub. Changing this forces a new resource to be created. func (o StreamInputIotHubOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputIotHub) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. func (o StreamInputIotHubOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputIotHub) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `serialization` block as defined below. func (o StreamInputIotHubOutput) Serialization() StreamInputIotHubSerializationOutput { return o.ApplyT(func(v *StreamInputIotHub) StreamInputIotHubSerializationOutput { return v.Serialization }).(StreamInputIotHubSerializationOutput) } // The shared access policy key for the specified shared access policy. Changing this forces a new resource to be created. func (o StreamInputIotHubOutput) SharedAccessPolicyKey() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputIotHub) pulumi.StringOutput { return v.SharedAccessPolicyKey }).(pulumi.StringOutput) } // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. func (o StreamInputIotHubOutput) SharedAccessPolicyName() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputIotHub) pulumi.StringOutput { return v.SharedAccessPolicyName }).(pulumi.StringOutput) } // The name of the Stream Analytics Job. Changing this forces a new resource to be created. func (o StreamInputIotHubOutput) StreamAnalyticsJobName() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputIotHub) pulumi.StringOutput { return v.StreamAnalyticsJobName }).(pulumi.StringOutput) } type StreamInputIotHubArrayOutput struct{ *pulumi.OutputState } func (StreamInputIotHubArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*StreamInputIotHub)(nil)).Elem() } func (o StreamInputIotHubArrayOutput) ToStreamInputIotHubArrayOutput() StreamInputIotHubArrayOutput { return o } func (o StreamInputIotHubArrayOutput) ToStreamInputIotHubArrayOutputWithContext(ctx context.Context) StreamInputIotHubArrayOutput { return o } func (o StreamInputIotHubArrayOutput) Index(i pulumi.IntInput) StreamInputIotHubOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StreamInputIotHub { return vs[0].([]*StreamInputIotHub)[vs[1].(int)] }).(StreamInputIotHubOutput) } type StreamInputIotHubMapOutput struct{ *pulumi.OutputState } func (StreamInputIotHubMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*StreamInputIotHub)(nil)).Elem() } func (o StreamInputIotHubMapOutput) ToStreamInputIotHubMapOutput() StreamInputIotHubMapOutput { return o } func (o StreamInputIotHubMapOutput) ToStreamInputIotHubMapOutputWithContext(ctx context.Context) StreamInputIotHubMapOutput { return o } func (o StreamInputIotHubMapOutput) MapIndex(k pulumi.StringInput) StreamInputIotHubOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StreamInputIotHub { return vs[0].(map[string]*StreamInputIotHub)[vs[1].(string)] }).(StreamInputIotHubOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*StreamInputIotHubInput)(nil)).Elem(), &StreamInputIotHub{}) pulumi.RegisterInputType(reflect.TypeOf((*StreamInputIotHubArrayInput)(nil)).Elem(), StreamInputIotHubArray{}) pulumi.RegisterInputType(reflect.TypeOf((*StreamInputIotHubMapInput)(nil)).Elem(), StreamInputIotHubMap{}) pulumi.RegisterOutputType(StreamInputIotHubOutput{}) pulumi.RegisterOutputType(StreamInputIotHubArrayOutput{}) pulumi.RegisterOutputType(StreamInputIotHubMapOutput{}) }
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/streamanalytics/streamInputBlob.go
sdk/go/azure/streamanalytics/streamInputBlob.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Stream Input Blob. // // ## 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "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 // } // example := streamanalytics.LookupJobOutput(ctx, streamanalytics.GetJobOutputArgs{ // Name: pulumi.String("example-job"), // ResourceGroupName: exampleResourceGroup.Name, // }, nil) // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestoracc"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{ // Name: pulumi.String("example"), // StorageAccountName: exampleAccount.Name, // ContainerAccessType: pulumi.String("private"), // }) // if err != nil { // return err // } // _, err = streamanalytics.NewStreamInputBlob(ctx, "example", &streamanalytics.StreamInputBlobArgs{ // Name: pulumi.String("blob-stream-input"), // StreamAnalyticsJobName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.Name, nil // }).(pulumi.StringPtrOutput)), // ResourceGroupName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.ResourceGroupName, nil // }).(pulumi.StringPtrOutput)), // StorageAccountName: exampleAccount.Name, // StorageAccountKey: exampleAccount.PrimaryAccessKey, // StorageContainerName: exampleContainer.Name, // PathPattern: pulumi.String("some-random-pattern"), // DateFormat: pulumi.String("yyyy/MM/dd"), // TimeFormat: pulumi.String("HH"), // Serialization: &streamanalytics.StreamInputBlobSerializationArgs{ // Type: pulumi.String("Json"), // Encoding: pulumi.String("UTF8"), // }, // }) // 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.StreamAnalytics` - 2020-03-01 // // ## Import // // Stream Analytics Stream Input Blob's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/streamInputBlob:StreamInputBlob example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/inputs/input1 // ``` type StreamInputBlob struct { pulumi.CustomResourceState // The authentication mode for the Stream Analytics Input. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrOutput `pulumi:"authenticationMode"` // The date format. Wherever `{date}` appears in `pathPattern`, the value of this property is used as the date format instead. DateFormat pulumi.StringOutput `pulumi:"dateFormat"` // The name of the Stream Input Blob. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. PathPattern pulumi.StringOutput `pulumi:"pathPattern"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization StreamInputBlobSerializationOutput `pulumi:"serialization"` // The Access Key which should be used to connect to this Storage Account. StorageAccountKey pulumi.StringOutput `pulumi:"storageAccountKey"` // The name of the Storage Account. StorageAccountName pulumi.StringOutput `pulumi:"storageAccountName"` // The name of the Container within the Storage Account. StorageContainerName pulumi.StringOutput `pulumi:"storageContainerName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringOutput `pulumi:"streamAnalyticsJobName"` // The time format. Wherever `{time}` appears in `pathPattern`, the value of this property is used as the time format instead. TimeFormat pulumi.StringOutput `pulumi:"timeFormat"` } // NewStreamInputBlob registers a new resource with the given unique name, arguments, and options. func NewStreamInputBlob(ctx *pulumi.Context, name string, args *StreamInputBlobArgs, opts ...pulumi.ResourceOption) (*StreamInputBlob, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DateFormat == nil { return nil, errors.New("invalid value for required argument 'DateFormat'") } if args.PathPattern == nil { return nil, errors.New("invalid value for required argument 'PathPattern'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Serialization == nil { return nil, errors.New("invalid value for required argument 'Serialization'") } if args.StorageAccountKey == nil { return nil, errors.New("invalid value for required argument 'StorageAccountKey'") } if args.StorageAccountName == nil { return nil, errors.New("invalid value for required argument 'StorageAccountName'") } if args.StorageContainerName == nil { return nil, errors.New("invalid value for required argument 'StorageContainerName'") } if args.StreamAnalyticsJobName == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobName'") } if args.TimeFormat == nil { return nil, errors.New("invalid value for required argument 'TimeFormat'") } if args.StorageAccountKey != nil { args.StorageAccountKey = pulumi.ToSecret(args.StorageAccountKey).(pulumi.StringInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "storageAccountKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource StreamInputBlob err := ctx.RegisterResource("azure:streamanalytics/streamInputBlob:StreamInputBlob", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetStreamInputBlob gets an existing StreamInputBlob 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 GetStreamInputBlob(ctx *pulumi.Context, name string, id pulumi.IDInput, state *StreamInputBlobState, opts ...pulumi.ResourceOption) (*StreamInputBlob, error) { var resource StreamInputBlob err := ctx.ReadResource("azure:streamanalytics/streamInputBlob:StreamInputBlob", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering StreamInputBlob resources. type streamInputBlobState struct { // The authentication mode for the Stream Analytics Input. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The date format. Wherever `{date}` appears in `pathPattern`, the value of this property is used as the date format instead. DateFormat *string `pulumi:"dateFormat"` // The name of the Stream Input Blob. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. PathPattern *string `pulumi:"pathPattern"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization *StreamInputBlobSerialization `pulumi:"serialization"` // The Access Key which should be used to connect to this Storage Account. StorageAccountKey *string `pulumi:"storageAccountKey"` // The name of the Storage Account. StorageAccountName *string `pulumi:"storageAccountName"` // The name of the Container within the Storage Account. StorageContainerName *string `pulumi:"storageContainerName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName *string `pulumi:"streamAnalyticsJobName"` // The time format. Wherever `{time}` appears in `pathPattern`, the value of this property is used as the time format instead. TimeFormat *string `pulumi:"timeFormat"` } type StreamInputBlobState struct { // The authentication mode for the Stream Analytics Input. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The date format. Wherever `{date}` appears in `pathPattern`, the value of this property is used as the date format instead. DateFormat pulumi.StringPtrInput // The name of the Stream Input Blob. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. PathPattern pulumi.StringPtrInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `serialization` block as defined below. Serialization StreamInputBlobSerializationPtrInput // The Access Key which should be used to connect to this Storage Account. StorageAccountKey pulumi.StringPtrInput // The name of the Storage Account. StorageAccountName pulumi.StringPtrInput // The name of the Container within the Storage Account. StorageContainerName pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringPtrInput // The time format. Wherever `{time}` appears in `pathPattern`, the value of this property is used as the time format instead. TimeFormat pulumi.StringPtrInput } func (StreamInputBlobState) ElementType() reflect.Type { return reflect.TypeOf((*streamInputBlobState)(nil)).Elem() } type streamInputBlobArgs struct { // The authentication mode for the Stream Analytics Input. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The date format. Wherever `{date}` appears in `pathPattern`, the value of this property is used as the date format instead. DateFormat string `pulumi:"dateFormat"` // The name of the Stream Input Blob. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. PathPattern string `pulumi:"pathPattern"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization StreamInputBlobSerialization `pulumi:"serialization"` // The Access Key which should be used to connect to this Storage Account. StorageAccountKey string `pulumi:"storageAccountKey"` // The name of the Storage Account. StorageAccountName string `pulumi:"storageAccountName"` // The name of the Container within the Storage Account. StorageContainerName string `pulumi:"storageContainerName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName string `pulumi:"streamAnalyticsJobName"` // The time format. Wherever `{time}` appears in `pathPattern`, the value of this property is used as the time format instead. TimeFormat string `pulumi:"timeFormat"` } // The set of arguments for constructing a StreamInputBlob resource. type StreamInputBlobArgs struct { // The authentication mode for the Stream Analytics Input. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The date format. Wherever `{date}` appears in `pathPattern`, the value of this property is used as the date format instead. DateFormat pulumi.StringInput // The name of the Stream Input Blob. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. PathPattern pulumi.StringInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A `serialization` block as defined below. Serialization StreamInputBlobSerializationInput // The Access Key which should be used to connect to this Storage Account. StorageAccountKey pulumi.StringInput // The name of the Storage Account. StorageAccountName pulumi.StringInput // The name of the Container within the Storage Account. StorageContainerName pulumi.StringInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringInput // The time format. Wherever `{time}` appears in `pathPattern`, the value of this property is used as the time format instead. TimeFormat pulumi.StringInput } func (StreamInputBlobArgs) ElementType() reflect.Type { return reflect.TypeOf((*streamInputBlobArgs)(nil)).Elem() } type StreamInputBlobInput interface { pulumi.Input ToStreamInputBlobOutput() StreamInputBlobOutput ToStreamInputBlobOutputWithContext(ctx context.Context) StreamInputBlobOutput } func (*StreamInputBlob) ElementType() reflect.Type { return reflect.TypeOf((**StreamInputBlob)(nil)).Elem() } func (i *StreamInputBlob) ToStreamInputBlobOutput() StreamInputBlobOutput { return i.ToStreamInputBlobOutputWithContext(context.Background()) } func (i *StreamInputBlob) ToStreamInputBlobOutputWithContext(ctx context.Context) StreamInputBlobOutput { return pulumi.ToOutputWithContext(ctx, i).(StreamInputBlobOutput) } // StreamInputBlobArrayInput is an input type that accepts StreamInputBlobArray and StreamInputBlobArrayOutput values. // You can construct a concrete instance of `StreamInputBlobArrayInput` via: // // StreamInputBlobArray{ StreamInputBlobArgs{...} } type StreamInputBlobArrayInput interface { pulumi.Input ToStreamInputBlobArrayOutput() StreamInputBlobArrayOutput ToStreamInputBlobArrayOutputWithContext(context.Context) StreamInputBlobArrayOutput } type StreamInputBlobArray []StreamInputBlobInput func (StreamInputBlobArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*StreamInputBlob)(nil)).Elem() } func (i StreamInputBlobArray) ToStreamInputBlobArrayOutput() StreamInputBlobArrayOutput { return i.ToStreamInputBlobArrayOutputWithContext(context.Background()) } func (i StreamInputBlobArray) ToStreamInputBlobArrayOutputWithContext(ctx context.Context) StreamInputBlobArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(StreamInputBlobArrayOutput) } // StreamInputBlobMapInput is an input type that accepts StreamInputBlobMap and StreamInputBlobMapOutput values. // You can construct a concrete instance of `StreamInputBlobMapInput` via: // // StreamInputBlobMap{ "key": StreamInputBlobArgs{...} } type StreamInputBlobMapInput interface { pulumi.Input ToStreamInputBlobMapOutput() StreamInputBlobMapOutput ToStreamInputBlobMapOutputWithContext(context.Context) StreamInputBlobMapOutput } type StreamInputBlobMap map[string]StreamInputBlobInput func (StreamInputBlobMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*StreamInputBlob)(nil)).Elem() } func (i StreamInputBlobMap) ToStreamInputBlobMapOutput() StreamInputBlobMapOutput { return i.ToStreamInputBlobMapOutputWithContext(context.Background()) } func (i StreamInputBlobMap) ToStreamInputBlobMapOutputWithContext(ctx context.Context) StreamInputBlobMapOutput { return pulumi.ToOutputWithContext(ctx, i).(StreamInputBlobMapOutput) } type StreamInputBlobOutput struct{ *pulumi.OutputState } func (StreamInputBlobOutput) ElementType() reflect.Type { return reflect.TypeOf((**StreamInputBlob)(nil)).Elem() } func (o StreamInputBlobOutput) ToStreamInputBlobOutput() StreamInputBlobOutput { return o } func (o StreamInputBlobOutput) ToStreamInputBlobOutputWithContext(ctx context.Context) StreamInputBlobOutput { return o } // The authentication mode for the Stream Analytics Input. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. func (o StreamInputBlobOutput) AuthenticationMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *StreamInputBlob) pulumi.StringPtrOutput { return v.AuthenticationMode }).(pulumi.StringPtrOutput) } // The date format. Wherever `{date}` appears in `pathPattern`, the value of this property is used as the date format instead. func (o StreamInputBlobOutput) DateFormat() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputBlob) pulumi.StringOutput { return v.DateFormat }).(pulumi.StringOutput) } // The name of the Stream Input Blob. Changing this forces a new resource to be created. func (o StreamInputBlobOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputBlob) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. func (o StreamInputBlobOutput) PathPattern() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputBlob) pulumi.StringOutput { return v.PathPattern }).(pulumi.StringOutput) } // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. func (o StreamInputBlobOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputBlob) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `serialization` block as defined below. func (o StreamInputBlobOutput) Serialization() StreamInputBlobSerializationOutput { return o.ApplyT(func(v *StreamInputBlob) StreamInputBlobSerializationOutput { return v.Serialization }).(StreamInputBlobSerializationOutput) } // The Access Key which should be used to connect to this Storage Account. func (o StreamInputBlobOutput) StorageAccountKey() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputBlob) pulumi.StringOutput { return v.StorageAccountKey }).(pulumi.StringOutput) } // The name of the Storage Account. func (o StreamInputBlobOutput) StorageAccountName() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputBlob) pulumi.StringOutput { return v.StorageAccountName }).(pulumi.StringOutput) } // The name of the Container within the Storage Account. func (o StreamInputBlobOutput) StorageContainerName() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputBlob) pulumi.StringOutput { return v.StorageContainerName }).(pulumi.StringOutput) } // The name of the Stream Analytics Job. Changing this forces a new resource to be created. func (o StreamInputBlobOutput) StreamAnalyticsJobName() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputBlob) pulumi.StringOutput { return v.StreamAnalyticsJobName }).(pulumi.StringOutput) } // The time format. Wherever `{time}` appears in `pathPattern`, the value of this property is used as the time format instead. func (o StreamInputBlobOutput) TimeFormat() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputBlob) pulumi.StringOutput { return v.TimeFormat }).(pulumi.StringOutput) } type StreamInputBlobArrayOutput struct{ *pulumi.OutputState } func (StreamInputBlobArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*StreamInputBlob)(nil)).Elem() } func (o StreamInputBlobArrayOutput) ToStreamInputBlobArrayOutput() StreamInputBlobArrayOutput { return o } func (o StreamInputBlobArrayOutput) ToStreamInputBlobArrayOutputWithContext(ctx context.Context) StreamInputBlobArrayOutput { return o } func (o StreamInputBlobArrayOutput) Index(i pulumi.IntInput) StreamInputBlobOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StreamInputBlob { return vs[0].([]*StreamInputBlob)[vs[1].(int)] }).(StreamInputBlobOutput) } type StreamInputBlobMapOutput struct{ *pulumi.OutputState } func (StreamInputBlobMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*StreamInputBlob)(nil)).Elem() } func (o StreamInputBlobMapOutput) ToStreamInputBlobMapOutput() StreamInputBlobMapOutput { return o } func (o StreamInputBlobMapOutput) ToStreamInputBlobMapOutputWithContext(ctx context.Context) StreamInputBlobMapOutput { return o } func (o StreamInputBlobMapOutput) MapIndex(k pulumi.StringInput) StreamInputBlobOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StreamInputBlob { return vs[0].(map[string]*StreamInputBlob)[vs[1].(string)] }).(StreamInputBlobOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*StreamInputBlobInput)(nil)).Elem(), &StreamInputBlob{}) pulumi.RegisterInputType(reflect.TypeOf((*StreamInputBlobArrayInput)(nil)).Elem(), StreamInputBlobArray{}) pulumi.RegisterInputType(reflect.TypeOf((*StreamInputBlobMapInput)(nil)).Elem(), StreamInputBlobMap{}) pulumi.RegisterOutputType(StreamInputBlobOutput{}) pulumi.RegisterOutputType(StreamInputBlobArrayOutput{}) pulumi.RegisterOutputType(StreamInputBlobMapOutput{}) }
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/streamanalytics/streamInputEventHubV2.go
sdk/go/azure/streamanalytics/streamInputEventHubV2.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // > **Note:** This resource creates a Stream Input of type `Microsoft.EventHub/EventHub`, to create a Stream Input of type `Microsoft.ServiceBus/EventHub` please use the resource azurerm_stream_analytics_stream_input_eventhub. // // Manages a Stream Analytics Stream Input EventHub V2. // // ## 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/eventhub" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "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 // } // example := streamanalytics.LookupJobOutput(ctx, streamanalytics.GetJobOutputArgs{ // Name: pulumi.String("example-job"), // ResourceGroupName: exampleResourceGroup.Name, // }, nil) // exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{ // Name: pulumi.String("example-namespace"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // Sku: pulumi.String("Standard"), // Capacity: pulumi.Int(1), // }) // if err != nil { // return err // } // exampleEventHub, err := eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{ // Name: pulumi.String("example-eventhub"), // NamespaceName: exampleEventHubNamespace.Name, // ResourceGroupName: exampleResourceGroup.Name, // PartitionCount: pulumi.Int(2), // MessageRetention: pulumi.Int(1), // }) // if err != nil { // return err // } // exampleConsumerGroup, err := eventhub.NewConsumerGroup(ctx, "example", &eventhub.ConsumerGroupArgs{ // Name: pulumi.String("example-consumergroup"), // NamespaceName: exampleEventHubNamespace.Name, // EventhubName: exampleEventHub.Name, // ResourceGroupName: exampleResourceGroup.Name, // }) // if err != nil { // return err // } // _, err = streamanalytics.NewStreamInputEventHubV2(ctx, "example", &streamanalytics.StreamInputEventHubV2Args{ // Name: pulumi.String("eventhub-stream-input"), // StreamAnalyticsJobId: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.Id, nil // }).(pulumi.StringPtrOutput)), // EventhubConsumerGroupName: exampleConsumerGroup.Name, // EventhubName: exampleEventHub.Name, // ServicebusNamespace: exampleEventHubNamespace.Name, // SharedAccessPolicyKey: exampleEventHubNamespace.DefaultPrimaryKey, // SharedAccessPolicyName: pulumi.String("RootManageSharedAccessKey"), // Serialization: &streamanalytics.StreamInputEventHubV2SerializationArgs{ // Type: pulumi.String("Json"), // Encoding: pulumi.String("UTF8"), // }, // }) // 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.StreamAnalytics` - 2020-03-01 // // ## Import // // Stream Analytics Stream Input EventHub's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/streamInputEventHubV2:StreamInputEventHubV2 example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/inputs/input1 // ``` type StreamInputEventHubV2 struct { pulumi.CustomResourceState // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrOutput `pulumi:"authenticationMode"` // The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not set the input will use the Event Hub's default consumer group. EventhubConsumerGroupName pulumi.StringPtrOutput `pulumi:"eventhubConsumerGroupName"` // The name of the Event Hub. EventhubName pulumi.StringOutput `pulumi:"eventhubName"` // The name of the Stream Input EventHub V2. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The property the input Event Hub has been partitioned by. PartitionKey pulumi.StringPtrOutput `pulumi:"partitionKey"` // A `serialization` block as defined below. Serialization StreamInputEventHubV2SerializationOutput `pulumi:"serialization"` // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace pulumi.StringOutput `pulumi:"servicebusNamespace"` // The shared access policy key for the specified shared access policy. SharedAccessPolicyKey pulumi.StringPtrOutput `pulumi:"sharedAccessPolicyKey"` // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. SharedAccessPolicyName pulumi.StringPtrOutput `pulumi:"sharedAccessPolicyName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId pulumi.StringOutput `pulumi:"streamAnalyticsJobId"` } // NewStreamInputEventHubV2 registers a new resource with the given unique name, arguments, and options. func NewStreamInputEventHubV2(ctx *pulumi.Context, name string, args *StreamInputEventHubV2Args, opts ...pulumi.ResourceOption) (*StreamInputEventHubV2, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.EventhubName == nil { return nil, errors.New("invalid value for required argument 'EventhubName'") } if args.Serialization == nil { return nil, errors.New("invalid value for required argument 'Serialization'") } if args.ServicebusNamespace == nil { return nil, errors.New("invalid value for required argument 'ServicebusNamespace'") } if args.StreamAnalyticsJobId == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobId'") } if args.SharedAccessPolicyKey != nil { args.SharedAccessPolicyKey = pulumi.ToSecret(args.SharedAccessPolicyKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "sharedAccessPolicyKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource StreamInputEventHubV2 err := ctx.RegisterResource("azure:streamanalytics/streamInputEventHubV2:StreamInputEventHubV2", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetStreamInputEventHubV2 gets an existing StreamInputEventHubV2 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 GetStreamInputEventHubV2(ctx *pulumi.Context, name string, id pulumi.IDInput, state *StreamInputEventHubV2State, opts ...pulumi.ResourceOption) (*StreamInputEventHubV2, error) { var resource StreamInputEventHubV2 err := ctx.ReadResource("azure:streamanalytics/streamInputEventHubV2:StreamInputEventHubV2", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering StreamInputEventHubV2 resources. type streamInputEventHubV2State struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not set the input will use the Event Hub's default consumer group. EventhubConsumerGroupName *string `pulumi:"eventhubConsumerGroupName"` // The name of the Event Hub. EventhubName *string `pulumi:"eventhubName"` // The name of the Stream Input EventHub V2. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The property the input Event Hub has been partitioned by. PartitionKey *string `pulumi:"partitionKey"` // A `serialization` block as defined below. Serialization *StreamInputEventHubV2Serialization `pulumi:"serialization"` // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace *string `pulumi:"servicebusNamespace"` // The shared access policy key for the specified shared access policy. SharedAccessPolicyKey *string `pulumi:"sharedAccessPolicyKey"` // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. SharedAccessPolicyName *string `pulumi:"sharedAccessPolicyName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId *string `pulumi:"streamAnalyticsJobId"` } type StreamInputEventHubV2State struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not set the input will use the Event Hub's default consumer group. EventhubConsumerGroupName pulumi.StringPtrInput // The name of the Event Hub. EventhubName pulumi.StringPtrInput // The name of the Stream Input EventHub V2. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The property the input Event Hub has been partitioned by. PartitionKey pulumi.StringPtrInput // A `serialization` block as defined below. Serialization StreamInputEventHubV2SerializationPtrInput // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace pulumi.StringPtrInput // The shared access policy key for the specified shared access policy. SharedAccessPolicyKey pulumi.StringPtrInput // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. SharedAccessPolicyName pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId pulumi.StringPtrInput } func (StreamInputEventHubV2State) ElementType() reflect.Type { return reflect.TypeOf((*streamInputEventHubV2State)(nil)).Elem() } type streamInputEventHubV2Args struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not set the input will use the Event Hub's default consumer group. EventhubConsumerGroupName *string `pulumi:"eventhubConsumerGroupName"` // The name of the Event Hub. EventhubName string `pulumi:"eventhubName"` // The name of the Stream Input EventHub V2. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The property the input Event Hub has been partitioned by. PartitionKey *string `pulumi:"partitionKey"` // A `serialization` block as defined below. Serialization StreamInputEventHubV2Serialization `pulumi:"serialization"` // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace string `pulumi:"servicebusNamespace"` // The shared access policy key for the specified shared access policy. SharedAccessPolicyKey *string `pulumi:"sharedAccessPolicyKey"` // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. SharedAccessPolicyName *string `pulumi:"sharedAccessPolicyName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId string `pulumi:"streamAnalyticsJobId"` } // The set of arguments for constructing a StreamInputEventHubV2 resource. type StreamInputEventHubV2Args struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not set the input will use the Event Hub's default consumer group. EventhubConsumerGroupName pulumi.StringPtrInput // The name of the Event Hub. EventhubName pulumi.StringInput // The name of the Stream Input EventHub V2. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The property the input Event Hub has been partitioned by. PartitionKey pulumi.StringPtrInput // A `serialization` block as defined below. Serialization StreamInputEventHubV2SerializationInput // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. ServicebusNamespace pulumi.StringInput // The shared access policy key for the specified shared access policy. SharedAccessPolicyKey pulumi.StringPtrInput // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. SharedAccessPolicyName pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobId pulumi.StringInput } func (StreamInputEventHubV2Args) ElementType() reflect.Type { return reflect.TypeOf((*streamInputEventHubV2Args)(nil)).Elem() } type StreamInputEventHubV2Input interface { pulumi.Input ToStreamInputEventHubV2Output() StreamInputEventHubV2Output ToStreamInputEventHubV2OutputWithContext(ctx context.Context) StreamInputEventHubV2Output } func (*StreamInputEventHubV2) ElementType() reflect.Type { return reflect.TypeOf((**StreamInputEventHubV2)(nil)).Elem() } func (i *StreamInputEventHubV2) ToStreamInputEventHubV2Output() StreamInputEventHubV2Output { return i.ToStreamInputEventHubV2OutputWithContext(context.Background()) } func (i *StreamInputEventHubV2) ToStreamInputEventHubV2OutputWithContext(ctx context.Context) StreamInputEventHubV2Output { return pulumi.ToOutputWithContext(ctx, i).(StreamInputEventHubV2Output) } // StreamInputEventHubV2ArrayInput is an input type that accepts StreamInputEventHubV2Array and StreamInputEventHubV2ArrayOutput values. // You can construct a concrete instance of `StreamInputEventHubV2ArrayInput` via: // // StreamInputEventHubV2Array{ StreamInputEventHubV2Args{...} } type StreamInputEventHubV2ArrayInput interface { pulumi.Input ToStreamInputEventHubV2ArrayOutput() StreamInputEventHubV2ArrayOutput ToStreamInputEventHubV2ArrayOutputWithContext(context.Context) StreamInputEventHubV2ArrayOutput } type StreamInputEventHubV2Array []StreamInputEventHubV2Input func (StreamInputEventHubV2Array) ElementType() reflect.Type { return reflect.TypeOf((*[]*StreamInputEventHubV2)(nil)).Elem() } func (i StreamInputEventHubV2Array) ToStreamInputEventHubV2ArrayOutput() StreamInputEventHubV2ArrayOutput { return i.ToStreamInputEventHubV2ArrayOutputWithContext(context.Background()) } func (i StreamInputEventHubV2Array) ToStreamInputEventHubV2ArrayOutputWithContext(ctx context.Context) StreamInputEventHubV2ArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(StreamInputEventHubV2ArrayOutput) } // StreamInputEventHubV2MapInput is an input type that accepts StreamInputEventHubV2Map and StreamInputEventHubV2MapOutput values. // You can construct a concrete instance of `StreamInputEventHubV2MapInput` via: // // StreamInputEventHubV2Map{ "key": StreamInputEventHubV2Args{...} } type StreamInputEventHubV2MapInput interface { pulumi.Input ToStreamInputEventHubV2MapOutput() StreamInputEventHubV2MapOutput ToStreamInputEventHubV2MapOutputWithContext(context.Context) StreamInputEventHubV2MapOutput } type StreamInputEventHubV2Map map[string]StreamInputEventHubV2Input func (StreamInputEventHubV2Map) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*StreamInputEventHubV2)(nil)).Elem() } func (i StreamInputEventHubV2Map) ToStreamInputEventHubV2MapOutput() StreamInputEventHubV2MapOutput { return i.ToStreamInputEventHubV2MapOutputWithContext(context.Background()) } func (i StreamInputEventHubV2Map) ToStreamInputEventHubV2MapOutputWithContext(ctx context.Context) StreamInputEventHubV2MapOutput { return pulumi.ToOutputWithContext(ctx, i).(StreamInputEventHubV2MapOutput) } type StreamInputEventHubV2Output struct{ *pulumi.OutputState } func (StreamInputEventHubV2Output) ElementType() reflect.Type { return reflect.TypeOf((**StreamInputEventHubV2)(nil)).Elem() } func (o StreamInputEventHubV2Output) ToStreamInputEventHubV2Output() StreamInputEventHubV2Output { return o } func (o StreamInputEventHubV2Output) ToStreamInputEventHubV2OutputWithContext(ctx context.Context) StreamInputEventHubV2Output { return o } // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. func (o StreamInputEventHubV2Output) AuthenticationMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *StreamInputEventHubV2) pulumi.StringPtrOutput { return v.AuthenticationMode }).(pulumi.StringPtrOutput) } // The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not set the input will use the Event Hub's default consumer group. func (o StreamInputEventHubV2Output) EventhubConsumerGroupName() pulumi.StringPtrOutput { return o.ApplyT(func(v *StreamInputEventHubV2) pulumi.StringPtrOutput { return v.EventhubConsumerGroupName }).(pulumi.StringPtrOutput) } // The name of the Event Hub. func (o StreamInputEventHubV2Output) EventhubName() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputEventHubV2) pulumi.StringOutput { return v.EventhubName }).(pulumi.StringOutput) } // The name of the Stream Input EventHub V2. Changing this forces a new resource to be created. func (o StreamInputEventHubV2Output) Name() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputEventHubV2) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The property the input Event Hub has been partitioned by. func (o StreamInputEventHubV2Output) PartitionKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *StreamInputEventHubV2) pulumi.StringPtrOutput { return v.PartitionKey }).(pulumi.StringPtrOutput) } // A `serialization` block as defined below. func (o StreamInputEventHubV2Output) Serialization() StreamInputEventHubV2SerializationOutput { return o.ApplyT(func(v *StreamInputEventHubV2) StreamInputEventHubV2SerializationOutput { return v.Serialization }).(StreamInputEventHubV2SerializationOutput) } // The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. func (o StreamInputEventHubV2Output) ServicebusNamespace() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputEventHubV2) pulumi.StringOutput { return v.ServicebusNamespace }).(pulumi.StringOutput) } // The shared access policy key for the specified shared access policy. func (o StreamInputEventHubV2Output) SharedAccessPolicyKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *StreamInputEventHubV2) pulumi.StringPtrOutput { return v.SharedAccessPolicyKey }).(pulumi.StringPtrOutput) } // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. func (o StreamInputEventHubV2Output) SharedAccessPolicyName() pulumi.StringPtrOutput { return o.ApplyT(func(v *StreamInputEventHubV2) pulumi.StringPtrOutput { return v.SharedAccessPolicyName }).(pulumi.StringPtrOutput) } // The name of the Stream Analytics Job. Changing this forces a new resource to be created. func (o StreamInputEventHubV2Output) StreamAnalyticsJobId() pulumi.StringOutput { return o.ApplyT(func(v *StreamInputEventHubV2) pulumi.StringOutput { return v.StreamAnalyticsJobId }).(pulumi.StringOutput) } type StreamInputEventHubV2ArrayOutput struct{ *pulumi.OutputState } func (StreamInputEventHubV2ArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*StreamInputEventHubV2)(nil)).Elem() } func (o StreamInputEventHubV2ArrayOutput) ToStreamInputEventHubV2ArrayOutput() StreamInputEventHubV2ArrayOutput { return o } func (o StreamInputEventHubV2ArrayOutput) ToStreamInputEventHubV2ArrayOutputWithContext(ctx context.Context) StreamInputEventHubV2ArrayOutput { return o } func (o StreamInputEventHubV2ArrayOutput) Index(i pulumi.IntInput) StreamInputEventHubV2Output { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StreamInputEventHubV2 { return vs[0].([]*StreamInputEventHubV2)[vs[1].(int)] }).(StreamInputEventHubV2Output) } type StreamInputEventHubV2MapOutput struct{ *pulumi.OutputState } func (StreamInputEventHubV2MapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*StreamInputEventHubV2)(nil)).Elem() } func (o StreamInputEventHubV2MapOutput) ToStreamInputEventHubV2MapOutput() StreamInputEventHubV2MapOutput { return o } func (o StreamInputEventHubV2MapOutput) ToStreamInputEventHubV2MapOutputWithContext(ctx context.Context) StreamInputEventHubV2MapOutput { return o } func (o StreamInputEventHubV2MapOutput) MapIndex(k pulumi.StringInput) StreamInputEventHubV2Output { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StreamInputEventHubV2 { return vs[0].(map[string]*StreamInputEventHubV2)[vs[1].(string)] }).(StreamInputEventHubV2Output) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*StreamInputEventHubV2Input)(nil)).Elem(), &StreamInputEventHubV2{}) pulumi.RegisterInputType(reflect.TypeOf((*StreamInputEventHubV2ArrayInput)(nil)).Elem(), StreamInputEventHubV2Array{}) pulumi.RegisterInputType(reflect.TypeOf((*StreamInputEventHubV2MapInput)(nil)).Elem(), StreamInputEventHubV2Map{}) pulumi.RegisterOutputType(StreamInputEventHubV2Output{}) pulumi.RegisterOutputType(StreamInputEventHubV2ArrayOutput{}) pulumi.RegisterOutputType(StreamInputEventHubV2MapOutput{}) }
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/streamanalytics/jobSchedule.go
sdk/go/azure/streamanalytics/jobSchedule.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Job Schedule. // // ## 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{ // Name: pulumi.String("example"), // StorageAccountName: exampleAccount.Name, // ContainerAccessType: pulumi.String("private"), // }) // if err != nil { // return err // } // _, err = storage.NewBlob(ctx, "example", &storage.BlobArgs{ // Name: pulumi.String("example"), // StorageAccountName: exampleAccount.Name, // StorageContainerName: exampleContainer.Name, // Type: pulumi.String("Block"), // Source: pulumi.NewFileAsset("example.csv"), // }) // if err != nil { // return err // } // exampleJob, err := streamanalytics.NewJob(ctx, "example", &streamanalytics.JobArgs{ // Name: pulumi.String("example-job"), // ResourceGroupName: example.Name, // Location: example.Location, // CompatibilityLevel: pulumi.String("1.2"), // DataLocale: pulumi.String("en-GB"), // EventsLateArrivalMaxDelayInSeconds: pulumi.Int(60), // EventsOutOfOrderMaxDelayInSeconds: pulumi.Int(50), // EventsOutOfOrderPolicy: pulumi.String("Adjust"), // OutputErrorPolicy: pulumi.String("Drop"), // StreamingUnits: pulumi.Int(3), // Tags: pulumi.StringMap{ // "environment": pulumi.String("Example"), // }, // TransformationQuery: pulumi.String(" SELECT *\n INTO [exampleoutput]\n FROM [exampleinput]\n"), // }) // if err != nil { // return err // } // exampleStreamInputBlob, err := streamanalytics.NewStreamInputBlob(ctx, "example", &streamanalytics.StreamInputBlobArgs{ // Name: pulumi.String("exampleinput"), // StreamAnalyticsJobName: exampleJob.Name, // ResourceGroupName: exampleJob.ResourceGroupName, // StorageAccountName: exampleAccount.Name, // StorageAccountKey: exampleAccount.PrimaryAccessKey, // StorageContainerName: exampleContainer.Name, // PathPattern: pulumi.String(""), // DateFormat: pulumi.String("yyyy/MM/dd"), // TimeFormat: pulumi.String("HH"), // Serialization: &streamanalytics.StreamInputBlobSerializationArgs{ // Type: pulumi.String("Csv"), // Encoding: pulumi.String("UTF8"), // FieldDelimiter: pulumi.String(","), // }, // }) // if err != nil { // return err // } // exampleOutputBlob, err := streamanalytics.NewOutputBlob(ctx, "example", &streamanalytics.OutputBlobArgs{ // Name: pulumi.String("exampleoutput"), // StreamAnalyticsJobName: exampleJob.Name, // ResourceGroupName: exampleJob.ResourceGroupName, // StorageAccountName: exampleAccount.Name, // StorageAccountKey: exampleAccount.PrimaryAccessKey, // StorageContainerName: exampleContainer.Name, // PathPattern: pulumi.String("example-{date}-{time}"), // DateFormat: pulumi.String("yyyy-MM-dd"), // TimeFormat: pulumi.String("HH"), // Serialization: &streamanalytics.OutputBlobSerializationArgs{ // Type: pulumi.String("Avro"), // }, // }) // if err != nil { // return err // } // _, err = streamanalytics.NewJobSchedule(ctx, "example", &streamanalytics.JobScheduleArgs{ // StreamAnalyticsJobId: exampleJob.ID(), // StartMode: pulumi.String("CustomTime"), // StartTime: pulumi.String("2022-09-21T00:00:00Z"), // }, pulumi.DependsOn([]pulumi.Resource{ // exampleJob, // exampleStreamInputBlob, // exampleOutputBlob, // })) // 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.StreamAnalytics` - 2021-10-01-preview // // ## Import // // Stream Analytics Job's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/jobSchedule:JobSchedule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/schedule/default // ``` type JobSchedule struct { pulumi.CustomResourceState // The time at which the Stream Analytics job last produced an output. LastOutputTime pulumi.StringOutput `pulumi:"lastOutputTime"` // The starting mode of the Stream Analytics Job. Possible values are `JobStartTime`, `CustomTime` and `LastOutputEventTime`. // // > **Note:** Setting `startMode` to `LastOutputEventTime` is only possible if the job had been previously started and produced output. StartMode pulumi.StringOutput `pulumi:"startMode"` // The time in ISO8601 format at which the Stream Analytics Job should be started e.g. `2022-04-01T00:00:00Z`. This property can only be specified if `startMode` is set to `CustomTime` StartTime pulumi.StringOutput `pulumi:"startTime"` // The ID of the Stream Analytics Job that should be scheduled or started. Changing this forces a new resource to be created. StreamAnalyticsJobId pulumi.StringOutput `pulumi:"streamAnalyticsJobId"` } // NewJobSchedule registers a new resource with the given unique name, arguments, and options. func NewJobSchedule(ctx *pulumi.Context, name string, args *JobScheduleArgs, opts ...pulumi.ResourceOption) (*JobSchedule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.StartMode == nil { return nil, errors.New("invalid value for required argument 'StartMode'") } if args.StreamAnalyticsJobId == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource JobSchedule err := ctx.RegisterResource("azure:streamanalytics/jobSchedule:JobSchedule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetJobSchedule gets an existing JobSchedule 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 GetJobSchedule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *JobScheduleState, opts ...pulumi.ResourceOption) (*JobSchedule, error) { var resource JobSchedule err := ctx.ReadResource("azure:streamanalytics/jobSchedule:JobSchedule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering JobSchedule resources. type jobScheduleState struct { // The time at which the Stream Analytics job last produced an output. LastOutputTime *string `pulumi:"lastOutputTime"` // The starting mode of the Stream Analytics Job. Possible values are `JobStartTime`, `CustomTime` and `LastOutputEventTime`. // // > **Note:** Setting `startMode` to `LastOutputEventTime` is only possible if the job had been previously started and produced output. StartMode *string `pulumi:"startMode"` // The time in ISO8601 format at which the Stream Analytics Job should be started e.g. `2022-04-01T00:00:00Z`. This property can only be specified if `startMode` is set to `CustomTime` StartTime *string `pulumi:"startTime"` // The ID of the Stream Analytics Job that should be scheduled or started. Changing this forces a new resource to be created. StreamAnalyticsJobId *string `pulumi:"streamAnalyticsJobId"` } type JobScheduleState struct { // The time at which the Stream Analytics job last produced an output. LastOutputTime pulumi.StringPtrInput // The starting mode of the Stream Analytics Job. Possible values are `JobStartTime`, `CustomTime` and `LastOutputEventTime`. // // > **Note:** Setting `startMode` to `LastOutputEventTime` is only possible if the job had been previously started and produced output. StartMode pulumi.StringPtrInput // The time in ISO8601 format at which the Stream Analytics Job should be started e.g. `2022-04-01T00:00:00Z`. This property can only be specified if `startMode` is set to `CustomTime` StartTime pulumi.StringPtrInput // The ID of the Stream Analytics Job that should be scheduled or started. Changing this forces a new resource to be created. StreamAnalyticsJobId pulumi.StringPtrInput } func (JobScheduleState) ElementType() reflect.Type { return reflect.TypeOf((*jobScheduleState)(nil)).Elem() } type jobScheduleArgs struct { // The starting mode of the Stream Analytics Job. Possible values are `JobStartTime`, `CustomTime` and `LastOutputEventTime`. // // > **Note:** Setting `startMode` to `LastOutputEventTime` is only possible if the job had been previously started and produced output. StartMode string `pulumi:"startMode"` // The time in ISO8601 format at which the Stream Analytics Job should be started e.g. `2022-04-01T00:00:00Z`. This property can only be specified if `startMode` is set to `CustomTime` StartTime *string `pulumi:"startTime"` // The ID of the Stream Analytics Job that should be scheduled or started. Changing this forces a new resource to be created. StreamAnalyticsJobId string `pulumi:"streamAnalyticsJobId"` } // The set of arguments for constructing a JobSchedule resource. type JobScheduleArgs struct { // The starting mode of the Stream Analytics Job. Possible values are `JobStartTime`, `CustomTime` and `LastOutputEventTime`. // // > **Note:** Setting `startMode` to `LastOutputEventTime` is only possible if the job had been previously started and produced output. StartMode pulumi.StringInput // The time in ISO8601 format at which the Stream Analytics Job should be started e.g. `2022-04-01T00:00:00Z`. This property can only be specified if `startMode` is set to `CustomTime` StartTime pulumi.StringPtrInput // The ID of the Stream Analytics Job that should be scheduled or started. Changing this forces a new resource to be created. StreamAnalyticsJobId pulumi.StringInput } func (JobScheduleArgs) ElementType() reflect.Type { return reflect.TypeOf((*jobScheduleArgs)(nil)).Elem() } type JobScheduleInput interface { pulumi.Input ToJobScheduleOutput() JobScheduleOutput ToJobScheduleOutputWithContext(ctx context.Context) JobScheduleOutput } func (*JobSchedule) ElementType() reflect.Type { return reflect.TypeOf((**JobSchedule)(nil)).Elem() } func (i *JobSchedule) ToJobScheduleOutput() JobScheduleOutput { return i.ToJobScheduleOutputWithContext(context.Background()) } func (i *JobSchedule) ToJobScheduleOutputWithContext(ctx context.Context) JobScheduleOutput { return pulumi.ToOutputWithContext(ctx, i).(JobScheduleOutput) } // JobScheduleArrayInput is an input type that accepts JobScheduleArray and JobScheduleArrayOutput values. // You can construct a concrete instance of `JobScheduleArrayInput` via: // // JobScheduleArray{ JobScheduleArgs{...} } type JobScheduleArrayInput interface { pulumi.Input ToJobScheduleArrayOutput() JobScheduleArrayOutput ToJobScheduleArrayOutputWithContext(context.Context) JobScheduleArrayOutput } type JobScheduleArray []JobScheduleInput func (JobScheduleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*JobSchedule)(nil)).Elem() } func (i JobScheduleArray) ToJobScheduleArrayOutput() JobScheduleArrayOutput { return i.ToJobScheduleArrayOutputWithContext(context.Background()) } func (i JobScheduleArray) ToJobScheduleArrayOutputWithContext(ctx context.Context) JobScheduleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(JobScheduleArrayOutput) } // JobScheduleMapInput is an input type that accepts JobScheduleMap and JobScheduleMapOutput values. // You can construct a concrete instance of `JobScheduleMapInput` via: // // JobScheduleMap{ "key": JobScheduleArgs{...} } type JobScheduleMapInput interface { pulumi.Input ToJobScheduleMapOutput() JobScheduleMapOutput ToJobScheduleMapOutputWithContext(context.Context) JobScheduleMapOutput } type JobScheduleMap map[string]JobScheduleInput func (JobScheduleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*JobSchedule)(nil)).Elem() } func (i JobScheduleMap) ToJobScheduleMapOutput() JobScheduleMapOutput { return i.ToJobScheduleMapOutputWithContext(context.Background()) } func (i JobScheduleMap) ToJobScheduleMapOutputWithContext(ctx context.Context) JobScheduleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(JobScheduleMapOutput) } type JobScheduleOutput struct{ *pulumi.OutputState } func (JobScheduleOutput) ElementType() reflect.Type { return reflect.TypeOf((**JobSchedule)(nil)).Elem() } func (o JobScheduleOutput) ToJobScheduleOutput() JobScheduleOutput { return o } func (o JobScheduleOutput) ToJobScheduleOutputWithContext(ctx context.Context) JobScheduleOutput { return o } // The time at which the Stream Analytics job last produced an output. func (o JobScheduleOutput) LastOutputTime() pulumi.StringOutput { return o.ApplyT(func(v *JobSchedule) pulumi.StringOutput { return v.LastOutputTime }).(pulumi.StringOutput) } // The starting mode of the Stream Analytics Job. Possible values are `JobStartTime`, `CustomTime` and `LastOutputEventTime`. // // > **Note:** Setting `startMode` to `LastOutputEventTime` is only possible if the job had been previously started and produced output. func (o JobScheduleOutput) StartMode() pulumi.StringOutput { return o.ApplyT(func(v *JobSchedule) pulumi.StringOutput { return v.StartMode }).(pulumi.StringOutput) } // The time in ISO8601 format at which the Stream Analytics Job should be started e.g. `2022-04-01T00:00:00Z`. This property can only be specified if `startMode` is set to `CustomTime` func (o JobScheduleOutput) StartTime() pulumi.StringOutput { return o.ApplyT(func(v *JobSchedule) pulumi.StringOutput { return v.StartTime }).(pulumi.StringOutput) } // The ID of the Stream Analytics Job that should be scheduled or started. Changing this forces a new resource to be created. func (o JobScheduleOutput) StreamAnalyticsJobId() pulumi.StringOutput { return o.ApplyT(func(v *JobSchedule) pulumi.StringOutput { return v.StreamAnalyticsJobId }).(pulumi.StringOutput) } type JobScheduleArrayOutput struct{ *pulumi.OutputState } func (JobScheduleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*JobSchedule)(nil)).Elem() } func (o JobScheduleArrayOutput) ToJobScheduleArrayOutput() JobScheduleArrayOutput { return o } func (o JobScheduleArrayOutput) ToJobScheduleArrayOutputWithContext(ctx context.Context) JobScheduleArrayOutput { return o } func (o JobScheduleArrayOutput) Index(i pulumi.IntInput) JobScheduleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *JobSchedule { return vs[0].([]*JobSchedule)[vs[1].(int)] }).(JobScheduleOutput) } type JobScheduleMapOutput struct{ *pulumi.OutputState } func (JobScheduleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*JobSchedule)(nil)).Elem() } func (o JobScheduleMapOutput) ToJobScheduleMapOutput() JobScheduleMapOutput { return o } func (o JobScheduleMapOutput) ToJobScheduleMapOutputWithContext(ctx context.Context) JobScheduleMapOutput { return o } func (o JobScheduleMapOutput) MapIndex(k pulumi.StringInput) JobScheduleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *JobSchedule { return vs[0].(map[string]*JobSchedule)[vs[1].(string)] }).(JobScheduleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*JobScheduleInput)(nil)).Elem(), &JobSchedule{}) pulumi.RegisterInputType(reflect.TypeOf((*JobScheduleArrayInput)(nil)).Elem(), JobScheduleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*JobScheduleMapInput)(nil)).Elem(), JobScheduleMap{}) pulumi.RegisterOutputType(JobScheduleOutput{}) pulumi.RegisterOutputType(JobScheduleArrayOutput{}) pulumi.RegisterOutputType(JobScheduleMapOutput{}) }
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/streamanalytics/outputServicebusTopic.go
sdk/go/azure/streamanalytics/outputServicebusTopic.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 streamanalytics import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Stream Analytics Output to a ServiceBus Topic. // // ## 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/servicebus" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/streamanalytics" // "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("rg-example"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // example := streamanalytics.LookupJobOutput(ctx, streamanalytics.GetJobOutputArgs{ // Name: pulumi.String("example-job"), // ResourceGroupName: exampleResourceGroup.Name, // }, nil) // exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{ // Name: pulumi.String("example-namespace"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // exampleTopic, err := servicebus.NewTopic(ctx, "example", &servicebus.TopicArgs{ // Name: pulumi.String("example-topic"), // NamespaceId: exampleNamespace.ID(), // EnablePartitioning: true, // }) // if err != nil { // return err // } // _, err = streamanalytics.NewOutputServicebusTopic(ctx, "example", &streamanalytics.OutputServicebusTopicArgs{ // Name: pulumi.String("service-bus-topic-output"), // StreamAnalyticsJobName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.Name, nil // }).(pulumi.StringPtrOutput)), // ResourceGroupName: pulumi.String(example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) { // return &example.ResourceGroupName, nil // }).(pulumi.StringPtrOutput)), // TopicName: exampleTopic.Name, // ServicebusNamespace: exampleNamespace.Name, // SharedAccessPolicyKey: exampleNamespace.DefaultPrimaryKey, // SharedAccessPolicyName: pulumi.String("RootManageSharedAccessKey"), // PropertyColumns: pulumi.StringArray{ // pulumi.String("col1"), // pulumi.String("col2"), // }, // Serialization: &streamanalytics.OutputServicebusTopicSerializationArgs{ // Type: pulumi.String("Csv"), // Format: pulumi.String("Array"), // }, // }) // 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.StreamAnalytics` - 2021-10-01-preview // // ## Import // // Stream Analytics Output ServiceBus Topic's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:streamanalytics/outputServicebusTopic:OutputServicebusTopic example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/outputs/output1 // ``` type OutputServicebusTopic struct { pulumi.CustomResourceState // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrOutput `pulumi:"authenticationMode"` // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A list of property columns to add to the Service Bus Topic output. PropertyColumns pulumi.StringArrayOutput `pulumi:"propertyColumns"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization OutputServicebusTopicSerializationOutput `pulumi:"serialization"` // The namespace that is associated with the desired Event Hub, Service Bus Topic, Service Bus Topic, etc. ServicebusNamespace pulumi.StringOutput `pulumi:"servicebusNamespace"` // The shared access policy key for the specified shared access policy. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyKey pulumi.StringPtrOutput `pulumi:"sharedAccessPolicyKey"` // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyName pulumi.StringPtrOutput `pulumi:"sharedAccessPolicyName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringOutput `pulumi:"streamAnalyticsJobName"` // A key-value pair of system property columns that will be attached to the outgoing messages for the Service Bus Topic Output. // // > **Note:** The acceptable keys are `ContentType`, `CorrelationId`, `Label`, `MessageId`, `PartitionKey`, `ReplyTo`, `ReplyToSessionId`, `ScheduledEnqueueTimeUtc`, `SessionId`, `TimeToLive` and `To`. SystemPropertyColumns pulumi.StringMapOutput `pulumi:"systemPropertyColumns"` // The name of the Service Bus Topic. TopicName pulumi.StringOutput `pulumi:"topicName"` } // NewOutputServicebusTopic registers a new resource with the given unique name, arguments, and options. func NewOutputServicebusTopic(ctx *pulumi.Context, name string, args *OutputServicebusTopicArgs, opts ...pulumi.ResourceOption) (*OutputServicebusTopic, 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.Serialization == nil { return nil, errors.New("invalid value for required argument 'Serialization'") } if args.ServicebusNamespace == nil { return nil, errors.New("invalid value for required argument 'ServicebusNamespace'") } if args.StreamAnalyticsJobName == nil { return nil, errors.New("invalid value for required argument 'StreamAnalyticsJobName'") } if args.TopicName == nil { return nil, errors.New("invalid value for required argument 'TopicName'") } if args.SharedAccessPolicyKey != nil { args.SharedAccessPolicyKey = pulumi.ToSecret(args.SharedAccessPolicyKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "sharedAccessPolicyKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource OutputServicebusTopic err := ctx.RegisterResource("azure:streamanalytics/outputServicebusTopic:OutputServicebusTopic", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetOutputServicebusTopic gets an existing OutputServicebusTopic 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 GetOutputServicebusTopic(ctx *pulumi.Context, name string, id pulumi.IDInput, state *OutputServicebusTopicState, opts ...pulumi.ResourceOption) (*OutputServicebusTopic, error) { var resource OutputServicebusTopic err := ctx.ReadResource("azure:streamanalytics/outputServicebusTopic:OutputServicebusTopic", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering OutputServicebusTopic resources. type outputServicebusTopicState struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The name of the Stream Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of property columns to add to the Service Bus Topic output. PropertyColumns []string `pulumi:"propertyColumns"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization *OutputServicebusTopicSerialization `pulumi:"serialization"` // The namespace that is associated with the desired Event Hub, Service Bus Topic, Service Bus Topic, etc. ServicebusNamespace *string `pulumi:"servicebusNamespace"` // The shared access policy key for the specified shared access policy. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyKey *string `pulumi:"sharedAccessPolicyKey"` // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyName *string `pulumi:"sharedAccessPolicyName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName *string `pulumi:"streamAnalyticsJobName"` // A key-value pair of system property columns that will be attached to the outgoing messages for the Service Bus Topic Output. // // > **Note:** The acceptable keys are `ContentType`, `CorrelationId`, `Label`, `MessageId`, `PartitionKey`, `ReplyTo`, `ReplyToSessionId`, `ScheduledEnqueueTimeUtc`, `SessionId`, `TimeToLive` and `To`. SystemPropertyColumns map[string]string `pulumi:"systemPropertyColumns"` // The name of the Service Bus Topic. TopicName *string `pulumi:"topicName"` } type OutputServicebusTopicState struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of property columns to add to the Service Bus Topic output. PropertyColumns pulumi.StringArrayInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `serialization` block as defined below. Serialization OutputServicebusTopicSerializationPtrInput // The namespace that is associated with the desired Event Hub, Service Bus Topic, Service Bus Topic, etc. ServicebusNamespace pulumi.StringPtrInput // The shared access policy key for the specified shared access policy. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyKey pulumi.StringPtrInput // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyName pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringPtrInput // A key-value pair of system property columns that will be attached to the outgoing messages for the Service Bus Topic Output. // // > **Note:** The acceptable keys are `ContentType`, `CorrelationId`, `Label`, `MessageId`, `PartitionKey`, `ReplyTo`, `ReplyToSessionId`, `ScheduledEnqueueTimeUtc`, `SessionId`, `TimeToLive` and `To`. SystemPropertyColumns pulumi.StringMapInput // The name of the Service Bus Topic. TopicName pulumi.StringPtrInput } func (OutputServicebusTopicState) ElementType() reflect.Type { return reflect.TypeOf((*outputServicebusTopicState)(nil)).Elem() } type outputServicebusTopicArgs struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode *string `pulumi:"authenticationMode"` // The name of the Stream Output. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of property columns to add to the Service Bus Topic output. PropertyColumns []string `pulumi:"propertyColumns"` // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `serialization` block as defined below. Serialization OutputServicebusTopicSerialization `pulumi:"serialization"` // The namespace that is associated with the desired Event Hub, Service Bus Topic, Service Bus Topic, etc. ServicebusNamespace string `pulumi:"servicebusNamespace"` // The shared access policy key for the specified shared access policy. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyKey *string `pulumi:"sharedAccessPolicyKey"` // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyName *string `pulumi:"sharedAccessPolicyName"` // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName string `pulumi:"streamAnalyticsJobName"` // A key-value pair of system property columns that will be attached to the outgoing messages for the Service Bus Topic Output. // // > **Note:** The acceptable keys are `ContentType`, `CorrelationId`, `Label`, `MessageId`, `PartitionKey`, `ReplyTo`, `ReplyToSessionId`, `ScheduledEnqueueTimeUtc`, `SessionId`, `TimeToLive` and `To`. SystemPropertyColumns map[string]string `pulumi:"systemPropertyColumns"` // The name of the Service Bus Topic. TopicName string `pulumi:"topicName"` } // The set of arguments for constructing a OutputServicebusTopic resource. type OutputServicebusTopicArgs struct { // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. AuthenticationMode pulumi.StringPtrInput // The name of the Stream Output. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of property columns to add to the Service Bus Topic output. PropertyColumns pulumi.StringArrayInput // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A `serialization` block as defined below. Serialization OutputServicebusTopicSerializationInput // The namespace that is associated with the desired Event Hub, Service Bus Topic, Service Bus Topic, etc. ServicebusNamespace pulumi.StringInput // The shared access policy key for the specified shared access policy. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyKey pulumi.StringPtrInput // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required if `authenticationMode` is `ConnectionString`. SharedAccessPolicyName pulumi.StringPtrInput // The name of the Stream Analytics Job. Changing this forces a new resource to be created. StreamAnalyticsJobName pulumi.StringInput // A key-value pair of system property columns that will be attached to the outgoing messages for the Service Bus Topic Output. // // > **Note:** The acceptable keys are `ContentType`, `CorrelationId`, `Label`, `MessageId`, `PartitionKey`, `ReplyTo`, `ReplyToSessionId`, `ScheduledEnqueueTimeUtc`, `SessionId`, `TimeToLive` and `To`. SystemPropertyColumns pulumi.StringMapInput // The name of the Service Bus Topic. TopicName pulumi.StringInput } func (OutputServicebusTopicArgs) ElementType() reflect.Type { return reflect.TypeOf((*outputServicebusTopicArgs)(nil)).Elem() } type OutputServicebusTopicInput interface { pulumi.Input ToOutputServicebusTopicOutput() OutputServicebusTopicOutput ToOutputServicebusTopicOutputWithContext(ctx context.Context) OutputServicebusTopicOutput } func (*OutputServicebusTopic) ElementType() reflect.Type { return reflect.TypeOf((**OutputServicebusTopic)(nil)).Elem() } func (i *OutputServicebusTopic) ToOutputServicebusTopicOutput() OutputServicebusTopicOutput { return i.ToOutputServicebusTopicOutputWithContext(context.Background()) } func (i *OutputServicebusTopic) ToOutputServicebusTopicOutputWithContext(ctx context.Context) OutputServicebusTopicOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputServicebusTopicOutput) } // OutputServicebusTopicArrayInput is an input type that accepts OutputServicebusTopicArray and OutputServicebusTopicArrayOutput values. // You can construct a concrete instance of `OutputServicebusTopicArrayInput` via: // // OutputServicebusTopicArray{ OutputServicebusTopicArgs{...} } type OutputServicebusTopicArrayInput interface { pulumi.Input ToOutputServicebusTopicArrayOutput() OutputServicebusTopicArrayOutput ToOutputServicebusTopicArrayOutputWithContext(context.Context) OutputServicebusTopicArrayOutput } type OutputServicebusTopicArray []OutputServicebusTopicInput func (OutputServicebusTopicArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputServicebusTopic)(nil)).Elem() } func (i OutputServicebusTopicArray) ToOutputServicebusTopicArrayOutput() OutputServicebusTopicArrayOutput { return i.ToOutputServicebusTopicArrayOutputWithContext(context.Background()) } func (i OutputServicebusTopicArray) ToOutputServicebusTopicArrayOutputWithContext(ctx context.Context) OutputServicebusTopicArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputServicebusTopicArrayOutput) } // OutputServicebusTopicMapInput is an input type that accepts OutputServicebusTopicMap and OutputServicebusTopicMapOutput values. // You can construct a concrete instance of `OutputServicebusTopicMapInput` via: // // OutputServicebusTopicMap{ "key": OutputServicebusTopicArgs{...} } type OutputServicebusTopicMapInput interface { pulumi.Input ToOutputServicebusTopicMapOutput() OutputServicebusTopicMapOutput ToOutputServicebusTopicMapOutputWithContext(context.Context) OutputServicebusTopicMapOutput } type OutputServicebusTopicMap map[string]OutputServicebusTopicInput func (OutputServicebusTopicMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputServicebusTopic)(nil)).Elem() } func (i OutputServicebusTopicMap) ToOutputServicebusTopicMapOutput() OutputServicebusTopicMapOutput { return i.ToOutputServicebusTopicMapOutputWithContext(context.Background()) } func (i OutputServicebusTopicMap) ToOutputServicebusTopicMapOutputWithContext(ctx context.Context) OutputServicebusTopicMapOutput { return pulumi.ToOutputWithContext(ctx, i).(OutputServicebusTopicMapOutput) } type OutputServicebusTopicOutput struct{ *pulumi.OutputState } func (OutputServicebusTopicOutput) ElementType() reflect.Type { return reflect.TypeOf((**OutputServicebusTopic)(nil)).Elem() } func (o OutputServicebusTopicOutput) ToOutputServicebusTopicOutput() OutputServicebusTopicOutput { return o } func (o OutputServicebusTopicOutput) ToOutputServicebusTopicOutputWithContext(ctx context.Context) OutputServicebusTopicOutput { return o } // The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`. func (o OutputServicebusTopicOutput) AuthenticationMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputServicebusTopic) pulumi.StringPtrOutput { return v.AuthenticationMode }).(pulumi.StringPtrOutput) } // The name of the Stream Output. Changing this forces a new resource to be created. func (o OutputServicebusTopicOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *OutputServicebusTopic) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A list of property columns to add to the Service Bus Topic output. func (o OutputServicebusTopicOutput) PropertyColumns() pulumi.StringArrayOutput { return o.ApplyT(func(v *OutputServicebusTopic) pulumi.StringArrayOutput { return v.PropertyColumns }).(pulumi.StringArrayOutput) } // The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created. func (o OutputServicebusTopicOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *OutputServicebusTopic) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `serialization` block as defined below. func (o OutputServicebusTopicOutput) Serialization() OutputServicebusTopicSerializationOutput { return o.ApplyT(func(v *OutputServicebusTopic) OutputServicebusTopicSerializationOutput { return v.Serialization }).(OutputServicebusTopicSerializationOutput) } // The namespace that is associated with the desired Event Hub, Service Bus Topic, Service Bus Topic, etc. func (o OutputServicebusTopicOutput) ServicebusNamespace() pulumi.StringOutput { return o.ApplyT(func(v *OutputServicebusTopic) pulumi.StringOutput { return v.ServicebusNamespace }).(pulumi.StringOutput) } // The shared access policy key for the specified shared access policy. Required if `authenticationMode` is `ConnectionString`. func (o OutputServicebusTopicOutput) SharedAccessPolicyKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputServicebusTopic) pulumi.StringPtrOutput { return v.SharedAccessPolicyKey }).(pulumi.StringPtrOutput) } // The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required if `authenticationMode` is `ConnectionString`. func (o OutputServicebusTopicOutput) SharedAccessPolicyName() pulumi.StringPtrOutput { return o.ApplyT(func(v *OutputServicebusTopic) pulumi.StringPtrOutput { return v.SharedAccessPolicyName }).(pulumi.StringPtrOutput) } // The name of the Stream Analytics Job. Changing this forces a new resource to be created. func (o OutputServicebusTopicOutput) StreamAnalyticsJobName() pulumi.StringOutput { return o.ApplyT(func(v *OutputServicebusTopic) pulumi.StringOutput { return v.StreamAnalyticsJobName }).(pulumi.StringOutput) } // A key-value pair of system property columns that will be attached to the outgoing messages for the Service Bus Topic Output. // // > **Note:** The acceptable keys are `ContentType`, `CorrelationId`, `Label`, `MessageId`, `PartitionKey`, `ReplyTo`, `ReplyToSessionId`, `ScheduledEnqueueTimeUtc`, `SessionId`, `TimeToLive` and `To`. func (o OutputServicebusTopicOutput) SystemPropertyColumns() pulumi.StringMapOutput { return o.ApplyT(func(v *OutputServicebusTopic) pulumi.StringMapOutput { return v.SystemPropertyColumns }).(pulumi.StringMapOutput) } // The name of the Service Bus Topic. func (o OutputServicebusTopicOutput) TopicName() pulumi.StringOutput { return o.ApplyT(func(v *OutputServicebusTopic) pulumi.StringOutput { return v.TopicName }).(pulumi.StringOutput) } type OutputServicebusTopicArrayOutput struct{ *pulumi.OutputState } func (OutputServicebusTopicArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*OutputServicebusTopic)(nil)).Elem() } func (o OutputServicebusTopicArrayOutput) ToOutputServicebusTopicArrayOutput() OutputServicebusTopicArrayOutput { return o } func (o OutputServicebusTopicArrayOutput) ToOutputServicebusTopicArrayOutputWithContext(ctx context.Context) OutputServicebusTopicArrayOutput { return o } func (o OutputServicebusTopicArrayOutput) Index(i pulumi.IntInput) OutputServicebusTopicOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *OutputServicebusTopic { return vs[0].([]*OutputServicebusTopic)[vs[1].(int)] }).(OutputServicebusTopicOutput) } type OutputServicebusTopicMapOutput struct{ *pulumi.OutputState } func (OutputServicebusTopicMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*OutputServicebusTopic)(nil)).Elem() } func (o OutputServicebusTopicMapOutput) ToOutputServicebusTopicMapOutput() OutputServicebusTopicMapOutput { return o } func (o OutputServicebusTopicMapOutput) ToOutputServicebusTopicMapOutputWithContext(ctx context.Context) OutputServicebusTopicMapOutput { return o } func (o OutputServicebusTopicMapOutput) MapIndex(k pulumi.StringInput) OutputServicebusTopicOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *OutputServicebusTopic { return vs[0].(map[string]*OutputServicebusTopic)[vs[1].(string)] }).(OutputServicebusTopicOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*OutputServicebusTopicInput)(nil)).Elem(), &OutputServicebusTopic{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputServicebusTopicArrayInput)(nil)).Elem(), OutputServicebusTopicArray{}) pulumi.RegisterInputType(reflect.TypeOf((*OutputServicebusTopicMapInput)(nil)).Elem(), OutputServicebusTopicMap{}) pulumi.RegisterOutputType(OutputServicebusTopicOutput{}) pulumi.RegisterOutputType(OutputServicebusTopicArrayOutput{}) pulumi.RegisterOutputType(OutputServicebusTopicMapOutput{}) }
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/synapse/getWorkspace.go
sdk/go/azure/synapse/getWorkspace.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 synapse 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 Synapse Workspace. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := synapse.LookupWorkspace(ctx, &synapse.LookupWorkspaceArgs{ // Name: "existing", // ResourceGroupName: "example-resource-group", // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // return nil // }) // } // // ``` func LookupWorkspace(ctx *pulumi.Context, args *LookupWorkspaceArgs, opts ...pulumi.InvokeOption) (*LookupWorkspaceResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupWorkspaceResult err := ctx.Invoke("azure:synapse/getWorkspace:getWorkspace", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getWorkspace. type LookupWorkspaceArgs struct { // The name of this Synapse Workspace. Name string `pulumi:"name"` // The name of the Resource Group where the Synapse Workspace exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getWorkspace. type LookupWorkspaceResult struct { // A map of Connectivity endpoints for this Synapse Workspace. ConnectivityEndpoints map[string]string `pulumi:"connectivityEndpoints"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // An `identity` block as defined below, which contains the Managed Service Identity information for this Synapse Workspace. Identities []GetWorkspaceIdentity `pulumi:"identities"` // The Azure location where the Synapse Workspace 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 LookupWorkspaceOutput(ctx *pulumi.Context, args LookupWorkspaceOutputArgs, opts ...pulumi.InvokeOption) LookupWorkspaceResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupWorkspaceResultOutput, error) { args := v.(LookupWorkspaceArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:synapse/getWorkspace:getWorkspace", args, LookupWorkspaceResultOutput{}, options).(LookupWorkspaceResultOutput), nil }).(LookupWorkspaceResultOutput) } // A collection of arguments for invoking getWorkspace. type LookupWorkspaceOutputArgs struct { // The name of this Synapse Workspace. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the Synapse Workspace exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupWorkspaceOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupWorkspaceArgs)(nil)).Elem() } // A collection of values returned by getWorkspace. type LookupWorkspaceResultOutput struct{ *pulumi.OutputState } func (LookupWorkspaceResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupWorkspaceResult)(nil)).Elem() } func (o LookupWorkspaceResultOutput) ToLookupWorkspaceResultOutput() LookupWorkspaceResultOutput { return o } func (o LookupWorkspaceResultOutput) ToLookupWorkspaceResultOutputWithContext(ctx context.Context) LookupWorkspaceResultOutput { return o } // A map of Connectivity endpoints for this Synapse Workspace. func (o LookupWorkspaceResultOutput) ConnectivityEndpoints() pulumi.StringMapOutput { return o.ApplyT(func(v LookupWorkspaceResult) map[string]string { return v.ConnectivityEndpoints }).(pulumi.StringMapOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupWorkspaceResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupWorkspaceResult) string { return v.Id }).(pulumi.StringOutput) } // An `identity` block as defined below, which contains the Managed Service Identity information for this Synapse Workspace. func (o LookupWorkspaceResultOutput) Identities() GetWorkspaceIdentityArrayOutput { return o.ApplyT(func(v LookupWorkspaceResult) []GetWorkspaceIdentity { return v.Identities }).(GetWorkspaceIdentityArrayOutput) } // The Azure location where the Synapse Workspace exists. func (o LookupWorkspaceResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupWorkspaceResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupWorkspaceResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupWorkspaceResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupWorkspaceResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupWorkspaceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o LookupWorkspaceResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupWorkspaceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupWorkspaceResultOutput{}) }
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/synapse/privateLinkHub.go
sdk/go/azure/synapse/privateLinkHub.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Synapse Private Link Hub. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := synapse.NewPrivateLinkHub(ctx, "example", &synapse.PrivateLinkHubArgs{ // Name: pulumi.String("example"), // ResourceGroupName: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse Private Link Hub can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/privateLinkHub:PrivateLinkHub example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Synapse/privateLinkHubs/privateLinkHub1 // ``` type PrivateLinkHub struct { pulumi.CustomResourceState // Specifies the Azure location where the Synapse Private Link Hub exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Synapse Private Link Hub. Changing this forces a new Synapse Private Link Hub to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which to create the Synapse Private Link Hub. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Synapse Private Link Hub. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewPrivateLinkHub registers a new resource with the given unique name, arguments, and options. func NewPrivateLinkHub(ctx *pulumi.Context, name string, args *PrivateLinkHubArgs, opts ...pulumi.ResourceOption) (*PrivateLinkHub, 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 PrivateLinkHub err := ctx.RegisterResource("azure:synapse/privateLinkHub:PrivateLinkHub", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetPrivateLinkHub gets an existing PrivateLinkHub 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 GetPrivateLinkHub(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PrivateLinkHubState, opts ...pulumi.ResourceOption) (*PrivateLinkHub, error) { var resource PrivateLinkHub err := ctx.ReadResource("azure:synapse/privateLinkHub:PrivateLinkHub", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering PrivateLinkHub resources. type privateLinkHubState struct { // Specifies the Azure location where the Synapse Private Link Hub exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name which should be used for this Synapse Private Link Hub. Changing this forces a new Synapse Private Link Hub to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Synapse Private Link Hub. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Synapse Private Link Hub. Tags map[string]string `pulumi:"tags"` } type PrivateLinkHubState struct { // Specifies the Azure location where the Synapse Private Link Hub exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name which should be used for this Synapse Private Link Hub. Changing this forces a new Synapse Private Link Hub to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Synapse Private Link Hub. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Synapse Private Link Hub. Tags pulumi.StringMapInput } func (PrivateLinkHubState) ElementType() reflect.Type { return reflect.TypeOf((*privateLinkHubState)(nil)).Elem() } type privateLinkHubArgs struct { // Specifies the Azure location where the Synapse Private Link Hub exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name which should be used for this Synapse Private Link Hub. Changing this forces a new Synapse Private Link Hub to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Synapse Private Link Hub. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Synapse Private Link Hub. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a PrivateLinkHub resource. type PrivateLinkHubArgs struct { // Specifies the Azure location where the Synapse Private Link Hub exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name which should be used for this Synapse Private Link Hub. Changing this forces a new Synapse Private Link Hub to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Synapse Private Link Hub. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags which should be assigned to the Synapse Private Link Hub. Tags pulumi.StringMapInput } func (PrivateLinkHubArgs) ElementType() reflect.Type { return reflect.TypeOf((*privateLinkHubArgs)(nil)).Elem() } type PrivateLinkHubInput interface { pulumi.Input ToPrivateLinkHubOutput() PrivateLinkHubOutput ToPrivateLinkHubOutputWithContext(ctx context.Context) PrivateLinkHubOutput } func (*PrivateLinkHub) ElementType() reflect.Type { return reflect.TypeOf((**PrivateLinkHub)(nil)).Elem() } func (i *PrivateLinkHub) ToPrivateLinkHubOutput() PrivateLinkHubOutput { return i.ToPrivateLinkHubOutputWithContext(context.Background()) } func (i *PrivateLinkHub) ToPrivateLinkHubOutputWithContext(ctx context.Context) PrivateLinkHubOutput { return pulumi.ToOutputWithContext(ctx, i).(PrivateLinkHubOutput) } // PrivateLinkHubArrayInput is an input type that accepts PrivateLinkHubArray and PrivateLinkHubArrayOutput values. // You can construct a concrete instance of `PrivateLinkHubArrayInput` via: // // PrivateLinkHubArray{ PrivateLinkHubArgs{...} } type PrivateLinkHubArrayInput interface { pulumi.Input ToPrivateLinkHubArrayOutput() PrivateLinkHubArrayOutput ToPrivateLinkHubArrayOutputWithContext(context.Context) PrivateLinkHubArrayOutput } type PrivateLinkHubArray []PrivateLinkHubInput func (PrivateLinkHubArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*PrivateLinkHub)(nil)).Elem() } func (i PrivateLinkHubArray) ToPrivateLinkHubArrayOutput() PrivateLinkHubArrayOutput { return i.ToPrivateLinkHubArrayOutputWithContext(context.Background()) } func (i PrivateLinkHubArray) ToPrivateLinkHubArrayOutputWithContext(ctx context.Context) PrivateLinkHubArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PrivateLinkHubArrayOutput) } // PrivateLinkHubMapInput is an input type that accepts PrivateLinkHubMap and PrivateLinkHubMapOutput values. // You can construct a concrete instance of `PrivateLinkHubMapInput` via: // // PrivateLinkHubMap{ "key": PrivateLinkHubArgs{...} } type PrivateLinkHubMapInput interface { pulumi.Input ToPrivateLinkHubMapOutput() PrivateLinkHubMapOutput ToPrivateLinkHubMapOutputWithContext(context.Context) PrivateLinkHubMapOutput } type PrivateLinkHubMap map[string]PrivateLinkHubInput func (PrivateLinkHubMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PrivateLinkHub)(nil)).Elem() } func (i PrivateLinkHubMap) ToPrivateLinkHubMapOutput() PrivateLinkHubMapOutput { return i.ToPrivateLinkHubMapOutputWithContext(context.Background()) } func (i PrivateLinkHubMap) ToPrivateLinkHubMapOutputWithContext(ctx context.Context) PrivateLinkHubMapOutput { return pulumi.ToOutputWithContext(ctx, i).(PrivateLinkHubMapOutput) } type PrivateLinkHubOutput struct{ *pulumi.OutputState } func (PrivateLinkHubOutput) ElementType() reflect.Type { return reflect.TypeOf((**PrivateLinkHub)(nil)).Elem() } func (o PrivateLinkHubOutput) ToPrivateLinkHubOutput() PrivateLinkHubOutput { return o } func (o PrivateLinkHubOutput) ToPrivateLinkHubOutputWithContext(ctx context.Context) PrivateLinkHubOutput { return o } // Specifies the Azure location where the Synapse Private Link Hub exists. Changing this forces a new resource to be created. func (o PrivateLinkHubOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *PrivateLinkHub) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Synapse Private Link Hub. Changing this forces a new Synapse Private Link Hub to be created. func (o PrivateLinkHubOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *PrivateLinkHub) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the Synapse Private Link Hub. Changing this forces a new resource to be created. func (o PrivateLinkHubOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *PrivateLinkHub) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Synapse Private Link Hub. func (o PrivateLinkHubOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *PrivateLinkHub) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type PrivateLinkHubArrayOutput struct{ *pulumi.OutputState } func (PrivateLinkHubArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*PrivateLinkHub)(nil)).Elem() } func (o PrivateLinkHubArrayOutput) ToPrivateLinkHubArrayOutput() PrivateLinkHubArrayOutput { return o } func (o PrivateLinkHubArrayOutput) ToPrivateLinkHubArrayOutputWithContext(ctx context.Context) PrivateLinkHubArrayOutput { return o } func (o PrivateLinkHubArrayOutput) Index(i pulumi.IntInput) PrivateLinkHubOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PrivateLinkHub { return vs[0].([]*PrivateLinkHub)[vs[1].(int)] }).(PrivateLinkHubOutput) } type PrivateLinkHubMapOutput struct{ *pulumi.OutputState } func (PrivateLinkHubMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PrivateLinkHub)(nil)).Elem() } func (o PrivateLinkHubMapOutput) ToPrivateLinkHubMapOutput() PrivateLinkHubMapOutput { return o } func (o PrivateLinkHubMapOutput) ToPrivateLinkHubMapOutputWithContext(ctx context.Context) PrivateLinkHubMapOutput { return o } func (o PrivateLinkHubMapOutput) MapIndex(k pulumi.StringInput) PrivateLinkHubOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PrivateLinkHub { return vs[0].(map[string]*PrivateLinkHub)[vs[1].(string)] }).(PrivateLinkHubOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*PrivateLinkHubInput)(nil)).Elem(), &PrivateLinkHub{}) pulumi.RegisterInputType(reflect.TypeOf((*PrivateLinkHubArrayInput)(nil)).Elem(), PrivateLinkHubArray{}) pulumi.RegisterInputType(reflect.TypeOf((*PrivateLinkHubMapInput)(nil)).Elem(), PrivateLinkHubMap{}) pulumi.RegisterOutputType(PrivateLinkHubOutput{}) pulumi.RegisterOutputType(PrivateLinkHubArrayOutput{}) pulumi.RegisterOutputType(PrivateLinkHubMapOutput{}) }
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/synapse/init.go
sdk/go/azure/synapse/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 synapse 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:synapse/firewallRule:FirewallRule": r = &FirewallRule{} case "azure:synapse/integrationRuntimeAzure:IntegrationRuntimeAzure": r = &IntegrationRuntimeAzure{} case "azure:synapse/integrationRuntimeSelfHosted:IntegrationRuntimeSelfHosted": r = &IntegrationRuntimeSelfHosted{} case "azure:synapse/linkedService:LinkedService": r = &LinkedService{} case "azure:synapse/managedPrivateEndpoint:ManagedPrivateEndpoint": r = &ManagedPrivateEndpoint{} case "azure:synapse/privateLinkHub:PrivateLinkHub": r = &PrivateLinkHub{} case "azure:synapse/roleAssignment:RoleAssignment": r = &RoleAssignment{} case "azure:synapse/sparkPool:SparkPool": r = &SparkPool{} case "azure:synapse/sqlPool:SqlPool": r = &SqlPool{} case "azure:synapse/sqlPoolExtendedAuditingPolicy:SqlPoolExtendedAuditingPolicy": r = &SqlPoolExtendedAuditingPolicy{} case "azure:synapse/sqlPoolSecurityAlertPolicy:SqlPoolSecurityAlertPolicy": r = &SqlPoolSecurityAlertPolicy{} case "azure:synapse/sqlPoolVulnerabilityAssessment:SqlPoolVulnerabilityAssessment": r = &SqlPoolVulnerabilityAssessment{} case "azure:synapse/sqlPoolVulnerabilityAssessmentBaseline:SqlPoolVulnerabilityAssessmentBaseline": r = &SqlPoolVulnerabilityAssessmentBaseline{} case "azure:synapse/sqlPoolWorkloadClassifier:SqlPoolWorkloadClassifier": r = &SqlPoolWorkloadClassifier{} case "azure:synapse/sqlPoolWorkloadGroup:SqlPoolWorkloadGroup": r = &SqlPoolWorkloadGroup{} case "azure:synapse/workspace:Workspace": r = &Workspace{} case "azure:synapse/workspaceAadAdmin:WorkspaceAadAdmin": r = &WorkspaceAadAdmin{} case "azure:synapse/workspaceExtendedAuditingPolicy:WorkspaceExtendedAuditingPolicy": r = &WorkspaceExtendedAuditingPolicy{} case "azure:synapse/workspaceKey:WorkspaceKey": r = &WorkspaceKey{} case "azure:synapse/workspaceSecurityAlertPolicy:WorkspaceSecurityAlertPolicy": r = &WorkspaceSecurityAlertPolicy{} case "azure:synapse/workspaceSqlAadAdmin:WorkspaceSqlAadAdmin": r = &WorkspaceSqlAadAdmin{} case "azure:synapse/workspaceVulnerabilityAssessment:WorkspaceVulnerabilityAssessment": r = &WorkspaceVulnerabilityAssessment{} 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", "synapse/firewallRule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/integrationRuntimeAzure", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/integrationRuntimeSelfHosted", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/linkedService", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/managedPrivateEndpoint", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/privateLinkHub", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/roleAssignment", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/sparkPool", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/sqlPool", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/sqlPoolExtendedAuditingPolicy", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/sqlPoolSecurityAlertPolicy", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/sqlPoolVulnerabilityAssessment", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/sqlPoolVulnerabilityAssessmentBaseline", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/sqlPoolWorkloadClassifier", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/sqlPoolWorkloadGroup", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/workspace", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/workspaceAadAdmin", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/workspaceExtendedAuditingPolicy", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/workspaceKey", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/workspaceSecurityAlertPolicy", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/workspaceSqlAadAdmin", &module{version}, ) pulumi.RegisterResourceModule( "azure", "synapse/workspaceVulnerabilityAssessment", &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/synapse/workspaceExtendedAuditingPolicy.go
sdk/go/azure/synapse/workspaceExtendedAuditingPolicy.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Synapse Workspace Extended Auditing Policy. // // ## 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("BlobStorage"), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // auditLogs, err := storage.NewAccount(ctx, "audit_logs", &storage.AccountArgs{ // Name: pulumi.String("examplesa"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // _, err = synapse.NewWorkspaceExtendedAuditingPolicy(ctx, "example", &synapse.WorkspaceExtendedAuditingPolicyArgs{ // SynapseWorkspaceId: exampleWorkspace.ID(), // StorageEndpoint: auditLogs.PrimaryBlobEndpoint, // StorageAccountAccessKey: auditLogs.PrimaryAccessKey, // StorageAccountAccessKeyIsSecondary: pulumi.Bool(false), // RetentionInDays: pulumi.Int(6), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse Workspace Extended Auditing Policies can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/workspaceExtendedAuditingPolicy:WorkspaceExtendedAuditingPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Synapse/workspaces/workspace1/extendedAuditingSettings/default // ``` type WorkspaceExtendedAuditingPolicy struct { pulumi.CustomResourceState // Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its master database audit events to Azure Monitor. Defaults to `true`. LogMonitoringEnabled pulumi.BoolPtrOutput `pulumi:"logMonitoringEnabled"` // The number of days to retain logs for in the storage account. Defaults to `0`. RetentionInDays pulumi.IntPtrOutput `pulumi:"retentionInDays"` // The access key to use for the auditing storage account. StorageAccountAccessKey pulumi.StringPtrOutput `pulumi:"storageAccountAccessKey"` // Is `storageAccountAccessKey` value the storage's secondary key? StorageAccountAccessKeyIsSecondary pulumi.BoolPtrOutput `pulumi:"storageAccountAccessKeyIsSecondary"` // The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs. StorageEndpoint pulumi.StringPtrOutput `pulumi:"storageEndpoint"` // The ID of the Synapse workspace to set the extended auditing policy. Changing this forces a new resource to be created. SynapseWorkspaceId pulumi.StringOutput `pulumi:"synapseWorkspaceId"` } // NewWorkspaceExtendedAuditingPolicy registers a new resource with the given unique name, arguments, and options. func NewWorkspaceExtendedAuditingPolicy(ctx *pulumi.Context, name string, args *WorkspaceExtendedAuditingPolicyArgs, opts ...pulumi.ResourceOption) (*WorkspaceExtendedAuditingPolicy, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.SynapseWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'SynapseWorkspaceId'") } if args.StorageAccountAccessKey != nil { args.StorageAccountAccessKey = pulumi.ToSecret(args.StorageAccountAccessKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "storageAccountAccessKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource WorkspaceExtendedAuditingPolicy err := ctx.RegisterResource("azure:synapse/workspaceExtendedAuditingPolicy:WorkspaceExtendedAuditingPolicy", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWorkspaceExtendedAuditingPolicy gets an existing WorkspaceExtendedAuditingPolicy 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 GetWorkspaceExtendedAuditingPolicy(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WorkspaceExtendedAuditingPolicyState, opts ...pulumi.ResourceOption) (*WorkspaceExtendedAuditingPolicy, error) { var resource WorkspaceExtendedAuditingPolicy err := ctx.ReadResource("azure:synapse/workspaceExtendedAuditingPolicy:WorkspaceExtendedAuditingPolicy", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering WorkspaceExtendedAuditingPolicy resources. type workspaceExtendedAuditingPolicyState struct { // Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its master database audit events to Azure Monitor. Defaults to `true`. LogMonitoringEnabled *bool `pulumi:"logMonitoringEnabled"` // The number of days to retain logs for in the storage account. Defaults to `0`. RetentionInDays *int `pulumi:"retentionInDays"` // The access key to use for the auditing storage account. StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"` // Is `storageAccountAccessKey` value the storage's secondary key? StorageAccountAccessKeyIsSecondary *bool `pulumi:"storageAccountAccessKeyIsSecondary"` // The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs. StorageEndpoint *string `pulumi:"storageEndpoint"` // The ID of the Synapse workspace to set the extended auditing policy. Changing this forces a new resource to be created. SynapseWorkspaceId *string `pulumi:"synapseWorkspaceId"` } type WorkspaceExtendedAuditingPolicyState struct { // Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its master database audit events to Azure Monitor. Defaults to `true`. LogMonitoringEnabled pulumi.BoolPtrInput // The number of days to retain logs for in the storage account. Defaults to `0`. RetentionInDays pulumi.IntPtrInput // The access key to use for the auditing storage account. StorageAccountAccessKey pulumi.StringPtrInput // Is `storageAccountAccessKey` value the storage's secondary key? StorageAccountAccessKeyIsSecondary pulumi.BoolPtrInput // The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs. StorageEndpoint pulumi.StringPtrInput // The ID of the Synapse workspace to set the extended auditing policy. Changing this forces a new resource to be created. SynapseWorkspaceId pulumi.StringPtrInput } func (WorkspaceExtendedAuditingPolicyState) ElementType() reflect.Type { return reflect.TypeOf((*workspaceExtendedAuditingPolicyState)(nil)).Elem() } type workspaceExtendedAuditingPolicyArgs struct { // Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its master database audit events to Azure Monitor. Defaults to `true`. LogMonitoringEnabled *bool `pulumi:"logMonitoringEnabled"` // The number of days to retain logs for in the storage account. Defaults to `0`. RetentionInDays *int `pulumi:"retentionInDays"` // The access key to use for the auditing storage account. StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"` // Is `storageAccountAccessKey` value the storage's secondary key? StorageAccountAccessKeyIsSecondary *bool `pulumi:"storageAccountAccessKeyIsSecondary"` // The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs. StorageEndpoint *string `pulumi:"storageEndpoint"` // The ID of the Synapse workspace to set the extended auditing policy. Changing this forces a new resource to be created. SynapseWorkspaceId string `pulumi:"synapseWorkspaceId"` } // The set of arguments for constructing a WorkspaceExtendedAuditingPolicy resource. type WorkspaceExtendedAuditingPolicyArgs struct { // Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its master database audit events to Azure Monitor. Defaults to `true`. LogMonitoringEnabled pulumi.BoolPtrInput // The number of days to retain logs for in the storage account. Defaults to `0`. RetentionInDays pulumi.IntPtrInput // The access key to use for the auditing storage account. StorageAccountAccessKey pulumi.StringPtrInput // Is `storageAccountAccessKey` value the storage's secondary key? StorageAccountAccessKeyIsSecondary pulumi.BoolPtrInput // The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs. StorageEndpoint pulumi.StringPtrInput // The ID of the Synapse workspace to set the extended auditing policy. Changing this forces a new resource to be created. SynapseWorkspaceId pulumi.StringInput } func (WorkspaceExtendedAuditingPolicyArgs) ElementType() reflect.Type { return reflect.TypeOf((*workspaceExtendedAuditingPolicyArgs)(nil)).Elem() } type WorkspaceExtendedAuditingPolicyInput interface { pulumi.Input ToWorkspaceExtendedAuditingPolicyOutput() WorkspaceExtendedAuditingPolicyOutput ToWorkspaceExtendedAuditingPolicyOutputWithContext(ctx context.Context) WorkspaceExtendedAuditingPolicyOutput } func (*WorkspaceExtendedAuditingPolicy) ElementType() reflect.Type { return reflect.TypeOf((**WorkspaceExtendedAuditingPolicy)(nil)).Elem() } func (i *WorkspaceExtendedAuditingPolicy) ToWorkspaceExtendedAuditingPolicyOutput() WorkspaceExtendedAuditingPolicyOutput { return i.ToWorkspaceExtendedAuditingPolicyOutputWithContext(context.Background()) } func (i *WorkspaceExtendedAuditingPolicy) ToWorkspaceExtendedAuditingPolicyOutputWithContext(ctx context.Context) WorkspaceExtendedAuditingPolicyOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceExtendedAuditingPolicyOutput) } // WorkspaceExtendedAuditingPolicyArrayInput is an input type that accepts WorkspaceExtendedAuditingPolicyArray and WorkspaceExtendedAuditingPolicyArrayOutput values. // You can construct a concrete instance of `WorkspaceExtendedAuditingPolicyArrayInput` via: // // WorkspaceExtendedAuditingPolicyArray{ WorkspaceExtendedAuditingPolicyArgs{...} } type WorkspaceExtendedAuditingPolicyArrayInput interface { pulumi.Input ToWorkspaceExtendedAuditingPolicyArrayOutput() WorkspaceExtendedAuditingPolicyArrayOutput ToWorkspaceExtendedAuditingPolicyArrayOutputWithContext(context.Context) WorkspaceExtendedAuditingPolicyArrayOutput } type WorkspaceExtendedAuditingPolicyArray []WorkspaceExtendedAuditingPolicyInput func (WorkspaceExtendedAuditingPolicyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*WorkspaceExtendedAuditingPolicy)(nil)).Elem() } func (i WorkspaceExtendedAuditingPolicyArray) ToWorkspaceExtendedAuditingPolicyArrayOutput() WorkspaceExtendedAuditingPolicyArrayOutput { return i.ToWorkspaceExtendedAuditingPolicyArrayOutputWithContext(context.Background()) } func (i WorkspaceExtendedAuditingPolicyArray) ToWorkspaceExtendedAuditingPolicyArrayOutputWithContext(ctx context.Context) WorkspaceExtendedAuditingPolicyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceExtendedAuditingPolicyArrayOutput) } // WorkspaceExtendedAuditingPolicyMapInput is an input type that accepts WorkspaceExtendedAuditingPolicyMap and WorkspaceExtendedAuditingPolicyMapOutput values. // You can construct a concrete instance of `WorkspaceExtendedAuditingPolicyMapInput` via: // // WorkspaceExtendedAuditingPolicyMap{ "key": WorkspaceExtendedAuditingPolicyArgs{...} } type WorkspaceExtendedAuditingPolicyMapInput interface { pulumi.Input ToWorkspaceExtendedAuditingPolicyMapOutput() WorkspaceExtendedAuditingPolicyMapOutput ToWorkspaceExtendedAuditingPolicyMapOutputWithContext(context.Context) WorkspaceExtendedAuditingPolicyMapOutput } type WorkspaceExtendedAuditingPolicyMap map[string]WorkspaceExtendedAuditingPolicyInput func (WorkspaceExtendedAuditingPolicyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WorkspaceExtendedAuditingPolicy)(nil)).Elem() } func (i WorkspaceExtendedAuditingPolicyMap) ToWorkspaceExtendedAuditingPolicyMapOutput() WorkspaceExtendedAuditingPolicyMapOutput { return i.ToWorkspaceExtendedAuditingPolicyMapOutputWithContext(context.Background()) } func (i WorkspaceExtendedAuditingPolicyMap) ToWorkspaceExtendedAuditingPolicyMapOutputWithContext(ctx context.Context) WorkspaceExtendedAuditingPolicyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceExtendedAuditingPolicyMapOutput) } type WorkspaceExtendedAuditingPolicyOutput struct{ *pulumi.OutputState } func (WorkspaceExtendedAuditingPolicyOutput) ElementType() reflect.Type { return reflect.TypeOf((**WorkspaceExtendedAuditingPolicy)(nil)).Elem() } func (o WorkspaceExtendedAuditingPolicyOutput) ToWorkspaceExtendedAuditingPolicyOutput() WorkspaceExtendedAuditingPolicyOutput { return o } func (o WorkspaceExtendedAuditingPolicyOutput) ToWorkspaceExtendedAuditingPolicyOutputWithContext(ctx context.Context) WorkspaceExtendedAuditingPolicyOutput { return o } // Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its master database audit events to Azure Monitor. Defaults to `true`. func (o WorkspaceExtendedAuditingPolicyOutput) LogMonitoringEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *WorkspaceExtendedAuditingPolicy) pulumi.BoolPtrOutput { return v.LogMonitoringEnabled }).(pulumi.BoolPtrOutput) } // The number of days to retain logs for in the storage account. Defaults to `0`. func (o WorkspaceExtendedAuditingPolicyOutput) RetentionInDays() pulumi.IntPtrOutput { return o.ApplyT(func(v *WorkspaceExtendedAuditingPolicy) pulumi.IntPtrOutput { return v.RetentionInDays }).(pulumi.IntPtrOutput) } // The access key to use for the auditing storage account. func (o WorkspaceExtendedAuditingPolicyOutput) StorageAccountAccessKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkspaceExtendedAuditingPolicy) pulumi.StringPtrOutput { return v.StorageAccountAccessKey }).(pulumi.StringPtrOutput) } // Is `storageAccountAccessKey` value the storage's secondary key? func (o WorkspaceExtendedAuditingPolicyOutput) StorageAccountAccessKeyIsSecondary() pulumi.BoolPtrOutput { return o.ApplyT(func(v *WorkspaceExtendedAuditingPolicy) pulumi.BoolPtrOutput { return v.StorageAccountAccessKeyIsSecondary }).(pulumi.BoolPtrOutput) } // The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs. func (o WorkspaceExtendedAuditingPolicyOutput) StorageEndpoint() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkspaceExtendedAuditingPolicy) pulumi.StringPtrOutput { return v.StorageEndpoint }).(pulumi.StringPtrOutput) } // The ID of the Synapse workspace to set the extended auditing policy. Changing this forces a new resource to be created. func (o WorkspaceExtendedAuditingPolicyOutput) SynapseWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceExtendedAuditingPolicy) pulumi.StringOutput { return v.SynapseWorkspaceId }).(pulumi.StringOutput) } type WorkspaceExtendedAuditingPolicyArrayOutput struct{ *pulumi.OutputState } func (WorkspaceExtendedAuditingPolicyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*WorkspaceExtendedAuditingPolicy)(nil)).Elem() } func (o WorkspaceExtendedAuditingPolicyArrayOutput) ToWorkspaceExtendedAuditingPolicyArrayOutput() WorkspaceExtendedAuditingPolicyArrayOutput { return o } func (o WorkspaceExtendedAuditingPolicyArrayOutput) ToWorkspaceExtendedAuditingPolicyArrayOutputWithContext(ctx context.Context) WorkspaceExtendedAuditingPolicyArrayOutput { return o } func (o WorkspaceExtendedAuditingPolicyArrayOutput) Index(i pulumi.IntInput) WorkspaceExtendedAuditingPolicyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkspaceExtendedAuditingPolicy { return vs[0].([]*WorkspaceExtendedAuditingPolicy)[vs[1].(int)] }).(WorkspaceExtendedAuditingPolicyOutput) } type WorkspaceExtendedAuditingPolicyMapOutput struct{ *pulumi.OutputState } func (WorkspaceExtendedAuditingPolicyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WorkspaceExtendedAuditingPolicy)(nil)).Elem() } func (o WorkspaceExtendedAuditingPolicyMapOutput) ToWorkspaceExtendedAuditingPolicyMapOutput() WorkspaceExtendedAuditingPolicyMapOutput { return o } func (o WorkspaceExtendedAuditingPolicyMapOutput) ToWorkspaceExtendedAuditingPolicyMapOutputWithContext(ctx context.Context) WorkspaceExtendedAuditingPolicyMapOutput { return o } func (o WorkspaceExtendedAuditingPolicyMapOutput) MapIndex(k pulumi.StringInput) WorkspaceExtendedAuditingPolicyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkspaceExtendedAuditingPolicy { return vs[0].(map[string]*WorkspaceExtendedAuditingPolicy)[vs[1].(string)] }).(WorkspaceExtendedAuditingPolicyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceExtendedAuditingPolicyInput)(nil)).Elem(), &WorkspaceExtendedAuditingPolicy{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceExtendedAuditingPolicyArrayInput)(nil)).Elem(), WorkspaceExtendedAuditingPolicyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceExtendedAuditingPolicyMapInput)(nil)).Elem(), WorkspaceExtendedAuditingPolicyMap{}) pulumi.RegisterOutputType(WorkspaceExtendedAuditingPolicyOutput{}) pulumi.RegisterOutputType(WorkspaceExtendedAuditingPolicyArrayOutput{}) pulumi.RegisterOutputType(WorkspaceExtendedAuditingPolicyMapOutput{}) }
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/synapse/pulumiTypes.go
sdk/go/azure/synapse/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 synapse 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 LinkedServiceIntegrationRuntime struct { // The integration runtime reference to associate with the Synapse Linked Service. Name string `pulumi:"name"` // A map of parameters to associate with the integration runtime. Parameters map[string]string `pulumi:"parameters"` } // LinkedServiceIntegrationRuntimeInput is an input type that accepts LinkedServiceIntegrationRuntimeArgs and LinkedServiceIntegrationRuntimeOutput values. // You can construct a concrete instance of `LinkedServiceIntegrationRuntimeInput` via: // // LinkedServiceIntegrationRuntimeArgs{...} type LinkedServiceIntegrationRuntimeInput interface { pulumi.Input ToLinkedServiceIntegrationRuntimeOutput() LinkedServiceIntegrationRuntimeOutput ToLinkedServiceIntegrationRuntimeOutputWithContext(context.Context) LinkedServiceIntegrationRuntimeOutput } type LinkedServiceIntegrationRuntimeArgs struct { // The integration runtime reference to associate with the Synapse Linked Service. Name pulumi.StringInput `pulumi:"name"` // A map of parameters to associate with the integration runtime. Parameters pulumi.StringMapInput `pulumi:"parameters"` } func (LinkedServiceIntegrationRuntimeArgs) ElementType() reflect.Type { return reflect.TypeOf((*LinkedServiceIntegrationRuntime)(nil)).Elem() } func (i LinkedServiceIntegrationRuntimeArgs) ToLinkedServiceIntegrationRuntimeOutput() LinkedServiceIntegrationRuntimeOutput { return i.ToLinkedServiceIntegrationRuntimeOutputWithContext(context.Background()) } func (i LinkedServiceIntegrationRuntimeArgs) ToLinkedServiceIntegrationRuntimeOutputWithContext(ctx context.Context) LinkedServiceIntegrationRuntimeOutput { return pulumi.ToOutputWithContext(ctx, i).(LinkedServiceIntegrationRuntimeOutput) } func (i LinkedServiceIntegrationRuntimeArgs) ToLinkedServiceIntegrationRuntimePtrOutput() LinkedServiceIntegrationRuntimePtrOutput { return i.ToLinkedServiceIntegrationRuntimePtrOutputWithContext(context.Background()) } func (i LinkedServiceIntegrationRuntimeArgs) ToLinkedServiceIntegrationRuntimePtrOutputWithContext(ctx context.Context) LinkedServiceIntegrationRuntimePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(LinkedServiceIntegrationRuntimeOutput).ToLinkedServiceIntegrationRuntimePtrOutputWithContext(ctx) } // LinkedServiceIntegrationRuntimePtrInput is an input type that accepts LinkedServiceIntegrationRuntimeArgs, LinkedServiceIntegrationRuntimePtr and LinkedServiceIntegrationRuntimePtrOutput values. // You can construct a concrete instance of `LinkedServiceIntegrationRuntimePtrInput` via: // // LinkedServiceIntegrationRuntimeArgs{...} // // or: // // nil type LinkedServiceIntegrationRuntimePtrInput interface { pulumi.Input ToLinkedServiceIntegrationRuntimePtrOutput() LinkedServiceIntegrationRuntimePtrOutput ToLinkedServiceIntegrationRuntimePtrOutputWithContext(context.Context) LinkedServiceIntegrationRuntimePtrOutput } type linkedServiceIntegrationRuntimePtrType LinkedServiceIntegrationRuntimeArgs func LinkedServiceIntegrationRuntimePtr(v *LinkedServiceIntegrationRuntimeArgs) LinkedServiceIntegrationRuntimePtrInput { return (*linkedServiceIntegrationRuntimePtrType)(v) } func (*linkedServiceIntegrationRuntimePtrType) ElementType() reflect.Type { return reflect.TypeOf((**LinkedServiceIntegrationRuntime)(nil)).Elem() } func (i *linkedServiceIntegrationRuntimePtrType) ToLinkedServiceIntegrationRuntimePtrOutput() LinkedServiceIntegrationRuntimePtrOutput { return i.ToLinkedServiceIntegrationRuntimePtrOutputWithContext(context.Background()) } func (i *linkedServiceIntegrationRuntimePtrType) ToLinkedServiceIntegrationRuntimePtrOutputWithContext(ctx context.Context) LinkedServiceIntegrationRuntimePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(LinkedServiceIntegrationRuntimePtrOutput) } type LinkedServiceIntegrationRuntimeOutput struct{ *pulumi.OutputState } func (LinkedServiceIntegrationRuntimeOutput) ElementType() reflect.Type { return reflect.TypeOf((*LinkedServiceIntegrationRuntime)(nil)).Elem() } func (o LinkedServiceIntegrationRuntimeOutput) ToLinkedServiceIntegrationRuntimeOutput() LinkedServiceIntegrationRuntimeOutput { return o } func (o LinkedServiceIntegrationRuntimeOutput) ToLinkedServiceIntegrationRuntimeOutputWithContext(ctx context.Context) LinkedServiceIntegrationRuntimeOutput { return o } func (o LinkedServiceIntegrationRuntimeOutput) ToLinkedServiceIntegrationRuntimePtrOutput() LinkedServiceIntegrationRuntimePtrOutput { return o.ToLinkedServiceIntegrationRuntimePtrOutputWithContext(context.Background()) } func (o LinkedServiceIntegrationRuntimeOutput) ToLinkedServiceIntegrationRuntimePtrOutputWithContext(ctx context.Context) LinkedServiceIntegrationRuntimePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v LinkedServiceIntegrationRuntime) *LinkedServiceIntegrationRuntime { return &v }).(LinkedServiceIntegrationRuntimePtrOutput) } // The integration runtime reference to associate with the Synapse Linked Service. func (o LinkedServiceIntegrationRuntimeOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LinkedServiceIntegrationRuntime) string { return v.Name }).(pulumi.StringOutput) } // A map of parameters to associate with the integration runtime. func (o LinkedServiceIntegrationRuntimeOutput) Parameters() pulumi.StringMapOutput { return o.ApplyT(func(v LinkedServiceIntegrationRuntime) map[string]string { return v.Parameters }).(pulumi.StringMapOutput) } type LinkedServiceIntegrationRuntimePtrOutput struct{ *pulumi.OutputState } func (LinkedServiceIntegrationRuntimePtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**LinkedServiceIntegrationRuntime)(nil)).Elem() } func (o LinkedServiceIntegrationRuntimePtrOutput) ToLinkedServiceIntegrationRuntimePtrOutput() LinkedServiceIntegrationRuntimePtrOutput { return o } func (o LinkedServiceIntegrationRuntimePtrOutput) ToLinkedServiceIntegrationRuntimePtrOutputWithContext(ctx context.Context) LinkedServiceIntegrationRuntimePtrOutput { return o } func (o LinkedServiceIntegrationRuntimePtrOutput) Elem() LinkedServiceIntegrationRuntimeOutput { return o.ApplyT(func(v *LinkedServiceIntegrationRuntime) LinkedServiceIntegrationRuntime { if v != nil { return *v } var ret LinkedServiceIntegrationRuntime return ret }).(LinkedServiceIntegrationRuntimeOutput) } // The integration runtime reference to associate with the Synapse Linked Service. func (o LinkedServiceIntegrationRuntimePtrOutput) Name() pulumi.StringPtrOutput { return o.ApplyT(func(v *LinkedServiceIntegrationRuntime) *string { if v == nil { return nil } return &v.Name }).(pulumi.StringPtrOutput) } // A map of parameters to associate with the integration runtime. func (o LinkedServiceIntegrationRuntimePtrOutput) Parameters() pulumi.StringMapOutput { return o.ApplyT(func(v *LinkedServiceIntegrationRuntime) map[string]string { if v == nil { return nil } return v.Parameters }).(pulumi.StringMapOutput) } type SparkPoolAutoPause struct { // Number of minutes of idle time before the Spark Pool is automatically paused. Must be between `5` and `10080`. DelayInMinutes int `pulumi:"delayInMinutes"` } // SparkPoolAutoPauseInput is an input type that accepts SparkPoolAutoPauseArgs and SparkPoolAutoPauseOutput values. // You can construct a concrete instance of `SparkPoolAutoPauseInput` via: // // SparkPoolAutoPauseArgs{...} type SparkPoolAutoPauseInput interface { pulumi.Input ToSparkPoolAutoPauseOutput() SparkPoolAutoPauseOutput ToSparkPoolAutoPauseOutputWithContext(context.Context) SparkPoolAutoPauseOutput } type SparkPoolAutoPauseArgs struct { // Number of minutes of idle time before the Spark Pool is automatically paused. Must be between `5` and `10080`. DelayInMinutes pulumi.IntInput `pulumi:"delayInMinutes"` } func (SparkPoolAutoPauseArgs) ElementType() reflect.Type { return reflect.TypeOf((*SparkPoolAutoPause)(nil)).Elem() } func (i SparkPoolAutoPauseArgs) ToSparkPoolAutoPauseOutput() SparkPoolAutoPauseOutput { return i.ToSparkPoolAutoPauseOutputWithContext(context.Background()) } func (i SparkPoolAutoPauseArgs) ToSparkPoolAutoPauseOutputWithContext(ctx context.Context) SparkPoolAutoPauseOutput { return pulumi.ToOutputWithContext(ctx, i).(SparkPoolAutoPauseOutput) } func (i SparkPoolAutoPauseArgs) ToSparkPoolAutoPausePtrOutput() SparkPoolAutoPausePtrOutput { return i.ToSparkPoolAutoPausePtrOutputWithContext(context.Background()) } func (i SparkPoolAutoPauseArgs) ToSparkPoolAutoPausePtrOutputWithContext(ctx context.Context) SparkPoolAutoPausePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(SparkPoolAutoPauseOutput).ToSparkPoolAutoPausePtrOutputWithContext(ctx) } // SparkPoolAutoPausePtrInput is an input type that accepts SparkPoolAutoPauseArgs, SparkPoolAutoPausePtr and SparkPoolAutoPausePtrOutput values. // You can construct a concrete instance of `SparkPoolAutoPausePtrInput` via: // // SparkPoolAutoPauseArgs{...} // // or: // // nil type SparkPoolAutoPausePtrInput interface { pulumi.Input ToSparkPoolAutoPausePtrOutput() SparkPoolAutoPausePtrOutput ToSparkPoolAutoPausePtrOutputWithContext(context.Context) SparkPoolAutoPausePtrOutput } type sparkPoolAutoPausePtrType SparkPoolAutoPauseArgs func SparkPoolAutoPausePtr(v *SparkPoolAutoPauseArgs) SparkPoolAutoPausePtrInput { return (*sparkPoolAutoPausePtrType)(v) } func (*sparkPoolAutoPausePtrType) ElementType() reflect.Type { return reflect.TypeOf((**SparkPoolAutoPause)(nil)).Elem() } func (i *sparkPoolAutoPausePtrType) ToSparkPoolAutoPausePtrOutput() SparkPoolAutoPausePtrOutput { return i.ToSparkPoolAutoPausePtrOutputWithContext(context.Background()) } func (i *sparkPoolAutoPausePtrType) ToSparkPoolAutoPausePtrOutputWithContext(ctx context.Context) SparkPoolAutoPausePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(SparkPoolAutoPausePtrOutput) } type SparkPoolAutoPauseOutput struct{ *pulumi.OutputState } func (SparkPoolAutoPauseOutput) ElementType() reflect.Type { return reflect.TypeOf((*SparkPoolAutoPause)(nil)).Elem() } func (o SparkPoolAutoPauseOutput) ToSparkPoolAutoPauseOutput() SparkPoolAutoPauseOutput { return o } func (o SparkPoolAutoPauseOutput) ToSparkPoolAutoPauseOutputWithContext(ctx context.Context) SparkPoolAutoPauseOutput { return o } func (o SparkPoolAutoPauseOutput) ToSparkPoolAutoPausePtrOutput() SparkPoolAutoPausePtrOutput { return o.ToSparkPoolAutoPausePtrOutputWithContext(context.Background()) } func (o SparkPoolAutoPauseOutput) ToSparkPoolAutoPausePtrOutputWithContext(ctx context.Context) SparkPoolAutoPausePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v SparkPoolAutoPause) *SparkPoolAutoPause { return &v }).(SparkPoolAutoPausePtrOutput) } // Number of minutes of idle time before the Spark Pool is automatically paused. Must be between `5` and `10080`. func (o SparkPoolAutoPauseOutput) DelayInMinutes() pulumi.IntOutput { return o.ApplyT(func(v SparkPoolAutoPause) int { return v.DelayInMinutes }).(pulumi.IntOutput) } type SparkPoolAutoPausePtrOutput struct{ *pulumi.OutputState } func (SparkPoolAutoPausePtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**SparkPoolAutoPause)(nil)).Elem() } func (o SparkPoolAutoPausePtrOutput) ToSparkPoolAutoPausePtrOutput() SparkPoolAutoPausePtrOutput { return o } func (o SparkPoolAutoPausePtrOutput) ToSparkPoolAutoPausePtrOutputWithContext(ctx context.Context) SparkPoolAutoPausePtrOutput { return o } func (o SparkPoolAutoPausePtrOutput) Elem() SparkPoolAutoPauseOutput { return o.ApplyT(func(v *SparkPoolAutoPause) SparkPoolAutoPause { if v != nil { return *v } var ret SparkPoolAutoPause return ret }).(SparkPoolAutoPauseOutput) } // Number of minutes of idle time before the Spark Pool is automatically paused. Must be between `5` and `10080`. func (o SparkPoolAutoPausePtrOutput) DelayInMinutes() pulumi.IntPtrOutput { return o.ApplyT(func(v *SparkPoolAutoPause) *int { if v == nil { return nil } return &v.DelayInMinutes }).(pulumi.IntPtrOutput) } type SparkPoolAutoScale struct { // The maximum number of nodes the Spark Pool can support. Must be between `3` and `200`. MaxNodeCount int `pulumi:"maxNodeCount"` // The minimum number of nodes the Spark Pool can support. Must be between `3` and `200`. MinNodeCount int `pulumi:"minNodeCount"` } // SparkPoolAutoScaleInput is an input type that accepts SparkPoolAutoScaleArgs and SparkPoolAutoScaleOutput values. // You can construct a concrete instance of `SparkPoolAutoScaleInput` via: // // SparkPoolAutoScaleArgs{...} type SparkPoolAutoScaleInput interface { pulumi.Input ToSparkPoolAutoScaleOutput() SparkPoolAutoScaleOutput ToSparkPoolAutoScaleOutputWithContext(context.Context) SparkPoolAutoScaleOutput } type SparkPoolAutoScaleArgs struct { // The maximum number of nodes the Spark Pool can support. Must be between `3` and `200`. MaxNodeCount pulumi.IntInput `pulumi:"maxNodeCount"` // The minimum number of nodes the Spark Pool can support. Must be between `3` and `200`. MinNodeCount pulumi.IntInput `pulumi:"minNodeCount"` } func (SparkPoolAutoScaleArgs) ElementType() reflect.Type { return reflect.TypeOf((*SparkPoolAutoScale)(nil)).Elem() } func (i SparkPoolAutoScaleArgs) ToSparkPoolAutoScaleOutput() SparkPoolAutoScaleOutput { return i.ToSparkPoolAutoScaleOutputWithContext(context.Background()) } func (i SparkPoolAutoScaleArgs) ToSparkPoolAutoScaleOutputWithContext(ctx context.Context) SparkPoolAutoScaleOutput { return pulumi.ToOutputWithContext(ctx, i).(SparkPoolAutoScaleOutput) } func (i SparkPoolAutoScaleArgs) ToSparkPoolAutoScalePtrOutput() SparkPoolAutoScalePtrOutput { return i.ToSparkPoolAutoScalePtrOutputWithContext(context.Background()) } func (i SparkPoolAutoScaleArgs) ToSparkPoolAutoScalePtrOutputWithContext(ctx context.Context) SparkPoolAutoScalePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(SparkPoolAutoScaleOutput).ToSparkPoolAutoScalePtrOutputWithContext(ctx) } // SparkPoolAutoScalePtrInput is an input type that accepts SparkPoolAutoScaleArgs, SparkPoolAutoScalePtr and SparkPoolAutoScalePtrOutput values. // You can construct a concrete instance of `SparkPoolAutoScalePtrInput` via: // // SparkPoolAutoScaleArgs{...} // // or: // // nil type SparkPoolAutoScalePtrInput interface { pulumi.Input ToSparkPoolAutoScalePtrOutput() SparkPoolAutoScalePtrOutput ToSparkPoolAutoScalePtrOutputWithContext(context.Context) SparkPoolAutoScalePtrOutput } type sparkPoolAutoScalePtrType SparkPoolAutoScaleArgs func SparkPoolAutoScalePtr(v *SparkPoolAutoScaleArgs) SparkPoolAutoScalePtrInput { return (*sparkPoolAutoScalePtrType)(v) } func (*sparkPoolAutoScalePtrType) ElementType() reflect.Type { return reflect.TypeOf((**SparkPoolAutoScale)(nil)).Elem() } func (i *sparkPoolAutoScalePtrType) ToSparkPoolAutoScalePtrOutput() SparkPoolAutoScalePtrOutput { return i.ToSparkPoolAutoScalePtrOutputWithContext(context.Background()) } func (i *sparkPoolAutoScalePtrType) ToSparkPoolAutoScalePtrOutputWithContext(ctx context.Context) SparkPoolAutoScalePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(SparkPoolAutoScalePtrOutput) } type SparkPoolAutoScaleOutput struct{ *pulumi.OutputState } func (SparkPoolAutoScaleOutput) ElementType() reflect.Type { return reflect.TypeOf((*SparkPoolAutoScale)(nil)).Elem() } func (o SparkPoolAutoScaleOutput) ToSparkPoolAutoScaleOutput() SparkPoolAutoScaleOutput { return o } func (o SparkPoolAutoScaleOutput) ToSparkPoolAutoScaleOutputWithContext(ctx context.Context) SparkPoolAutoScaleOutput { return o } func (o SparkPoolAutoScaleOutput) ToSparkPoolAutoScalePtrOutput() SparkPoolAutoScalePtrOutput { return o.ToSparkPoolAutoScalePtrOutputWithContext(context.Background()) } func (o SparkPoolAutoScaleOutput) ToSparkPoolAutoScalePtrOutputWithContext(ctx context.Context) SparkPoolAutoScalePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v SparkPoolAutoScale) *SparkPoolAutoScale { return &v }).(SparkPoolAutoScalePtrOutput) } // The maximum number of nodes the Spark Pool can support. Must be between `3` and `200`. func (o SparkPoolAutoScaleOutput) MaxNodeCount() pulumi.IntOutput { return o.ApplyT(func(v SparkPoolAutoScale) int { return v.MaxNodeCount }).(pulumi.IntOutput) } // The minimum number of nodes the Spark Pool can support. Must be between `3` and `200`. func (o SparkPoolAutoScaleOutput) MinNodeCount() pulumi.IntOutput { return o.ApplyT(func(v SparkPoolAutoScale) int { return v.MinNodeCount }).(pulumi.IntOutput) } type SparkPoolAutoScalePtrOutput struct{ *pulumi.OutputState } func (SparkPoolAutoScalePtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**SparkPoolAutoScale)(nil)).Elem() } func (o SparkPoolAutoScalePtrOutput) ToSparkPoolAutoScalePtrOutput() SparkPoolAutoScalePtrOutput { return o } func (o SparkPoolAutoScalePtrOutput) ToSparkPoolAutoScalePtrOutputWithContext(ctx context.Context) SparkPoolAutoScalePtrOutput { return o } func (o SparkPoolAutoScalePtrOutput) Elem() SparkPoolAutoScaleOutput { return o.ApplyT(func(v *SparkPoolAutoScale) SparkPoolAutoScale { if v != nil { return *v } var ret SparkPoolAutoScale return ret }).(SparkPoolAutoScaleOutput) } // The maximum number of nodes the Spark Pool can support. Must be between `3` and `200`. func (o SparkPoolAutoScalePtrOutput) MaxNodeCount() pulumi.IntPtrOutput { return o.ApplyT(func(v *SparkPoolAutoScale) *int { if v == nil { return nil } return &v.MaxNodeCount }).(pulumi.IntPtrOutput) } // The minimum number of nodes the Spark Pool can support. Must be between `3` and `200`. func (o SparkPoolAutoScalePtrOutput) MinNodeCount() pulumi.IntPtrOutput { return o.ApplyT(func(v *SparkPoolAutoScale) *int { if v == nil { return nil } return &v.MinNodeCount }).(pulumi.IntPtrOutput) } type SparkPoolLibraryRequirement struct { // The content of library requirements. Content string `pulumi:"content"` // The name of the library requirements file. Filename string `pulumi:"filename"` } // SparkPoolLibraryRequirementInput is an input type that accepts SparkPoolLibraryRequirementArgs and SparkPoolLibraryRequirementOutput values. // You can construct a concrete instance of `SparkPoolLibraryRequirementInput` via: // // SparkPoolLibraryRequirementArgs{...} type SparkPoolLibraryRequirementInput interface { pulumi.Input ToSparkPoolLibraryRequirementOutput() SparkPoolLibraryRequirementOutput ToSparkPoolLibraryRequirementOutputWithContext(context.Context) SparkPoolLibraryRequirementOutput } type SparkPoolLibraryRequirementArgs struct { // The content of library requirements. Content pulumi.StringInput `pulumi:"content"` // The name of the library requirements file. Filename pulumi.StringInput `pulumi:"filename"` } func (SparkPoolLibraryRequirementArgs) ElementType() reflect.Type { return reflect.TypeOf((*SparkPoolLibraryRequirement)(nil)).Elem() } func (i SparkPoolLibraryRequirementArgs) ToSparkPoolLibraryRequirementOutput() SparkPoolLibraryRequirementOutput { return i.ToSparkPoolLibraryRequirementOutputWithContext(context.Background()) } func (i SparkPoolLibraryRequirementArgs) ToSparkPoolLibraryRequirementOutputWithContext(ctx context.Context) SparkPoolLibraryRequirementOutput { return pulumi.ToOutputWithContext(ctx, i).(SparkPoolLibraryRequirementOutput) } func (i SparkPoolLibraryRequirementArgs) ToSparkPoolLibraryRequirementPtrOutput() SparkPoolLibraryRequirementPtrOutput { return i.ToSparkPoolLibraryRequirementPtrOutputWithContext(context.Background()) } func (i SparkPoolLibraryRequirementArgs) ToSparkPoolLibraryRequirementPtrOutputWithContext(ctx context.Context) SparkPoolLibraryRequirementPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(SparkPoolLibraryRequirementOutput).ToSparkPoolLibraryRequirementPtrOutputWithContext(ctx) } // SparkPoolLibraryRequirementPtrInput is an input type that accepts SparkPoolLibraryRequirementArgs, SparkPoolLibraryRequirementPtr and SparkPoolLibraryRequirementPtrOutput values. // You can construct a concrete instance of `SparkPoolLibraryRequirementPtrInput` via: // // SparkPoolLibraryRequirementArgs{...} // // or: // // nil type SparkPoolLibraryRequirementPtrInput interface { pulumi.Input ToSparkPoolLibraryRequirementPtrOutput() SparkPoolLibraryRequirementPtrOutput ToSparkPoolLibraryRequirementPtrOutputWithContext(context.Context) SparkPoolLibraryRequirementPtrOutput } type sparkPoolLibraryRequirementPtrType SparkPoolLibraryRequirementArgs func SparkPoolLibraryRequirementPtr(v *SparkPoolLibraryRequirementArgs) SparkPoolLibraryRequirementPtrInput { return (*sparkPoolLibraryRequirementPtrType)(v) } func (*sparkPoolLibraryRequirementPtrType) ElementType() reflect.Type { return reflect.TypeOf((**SparkPoolLibraryRequirement)(nil)).Elem() } func (i *sparkPoolLibraryRequirementPtrType) ToSparkPoolLibraryRequirementPtrOutput() SparkPoolLibraryRequirementPtrOutput { return i.ToSparkPoolLibraryRequirementPtrOutputWithContext(context.Background()) } func (i *sparkPoolLibraryRequirementPtrType) ToSparkPoolLibraryRequirementPtrOutputWithContext(ctx context.Context) SparkPoolLibraryRequirementPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(SparkPoolLibraryRequirementPtrOutput) } type SparkPoolLibraryRequirementOutput struct{ *pulumi.OutputState } func (SparkPoolLibraryRequirementOutput) ElementType() reflect.Type { return reflect.TypeOf((*SparkPoolLibraryRequirement)(nil)).Elem() } func (o SparkPoolLibraryRequirementOutput) ToSparkPoolLibraryRequirementOutput() SparkPoolLibraryRequirementOutput { return o } func (o SparkPoolLibraryRequirementOutput) ToSparkPoolLibraryRequirementOutputWithContext(ctx context.Context) SparkPoolLibraryRequirementOutput { return o } func (o SparkPoolLibraryRequirementOutput) ToSparkPoolLibraryRequirementPtrOutput() SparkPoolLibraryRequirementPtrOutput { return o.ToSparkPoolLibraryRequirementPtrOutputWithContext(context.Background()) } func (o SparkPoolLibraryRequirementOutput) ToSparkPoolLibraryRequirementPtrOutputWithContext(ctx context.Context) SparkPoolLibraryRequirementPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v SparkPoolLibraryRequirement) *SparkPoolLibraryRequirement { return &v }).(SparkPoolLibraryRequirementPtrOutput) } // The content of library requirements. func (o SparkPoolLibraryRequirementOutput) Content() pulumi.StringOutput { return o.ApplyT(func(v SparkPoolLibraryRequirement) string { return v.Content }).(pulumi.StringOutput) } // The name of the library requirements file. func (o SparkPoolLibraryRequirementOutput) Filename() pulumi.StringOutput { return o.ApplyT(func(v SparkPoolLibraryRequirement) string { return v.Filename }).(pulumi.StringOutput) } type SparkPoolLibraryRequirementPtrOutput struct{ *pulumi.OutputState } func (SparkPoolLibraryRequirementPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**SparkPoolLibraryRequirement)(nil)).Elem() } func (o SparkPoolLibraryRequirementPtrOutput) ToSparkPoolLibraryRequirementPtrOutput() SparkPoolLibraryRequirementPtrOutput { return o } func (o SparkPoolLibraryRequirementPtrOutput) ToSparkPoolLibraryRequirementPtrOutputWithContext(ctx context.Context) SparkPoolLibraryRequirementPtrOutput { return o } func (o SparkPoolLibraryRequirementPtrOutput) Elem() SparkPoolLibraryRequirementOutput { return o.ApplyT(func(v *SparkPoolLibraryRequirement) SparkPoolLibraryRequirement { if v != nil { return *v } var ret SparkPoolLibraryRequirement return ret }).(SparkPoolLibraryRequirementOutput) } // The content of library requirements. func (o SparkPoolLibraryRequirementPtrOutput) Content() pulumi.StringPtrOutput { return o.ApplyT(func(v *SparkPoolLibraryRequirement) *string { if v == nil { return nil } return &v.Content }).(pulumi.StringPtrOutput) } // The name of the library requirements file. func (o SparkPoolLibraryRequirementPtrOutput) Filename() pulumi.StringPtrOutput { return o.ApplyT(func(v *SparkPoolLibraryRequirement) *string { if v == nil { return nil } return &v.Filename }).(pulumi.StringPtrOutput) } type SparkPoolSparkConfig struct { // The contents of a spark configuration. Content string `pulumi:"content"` // The name of the file where the spark configuration `content` will be stored. Filename string `pulumi:"filename"` } // SparkPoolSparkConfigInput is an input type that accepts SparkPoolSparkConfigArgs and SparkPoolSparkConfigOutput values. // You can construct a concrete instance of `SparkPoolSparkConfigInput` via: // // SparkPoolSparkConfigArgs{...} type SparkPoolSparkConfigInput interface { pulumi.Input ToSparkPoolSparkConfigOutput() SparkPoolSparkConfigOutput ToSparkPoolSparkConfigOutputWithContext(context.Context) SparkPoolSparkConfigOutput } type SparkPoolSparkConfigArgs struct { // The contents of a spark configuration. Content pulumi.StringInput `pulumi:"content"` // The name of the file where the spark configuration `content` will be stored. Filename pulumi.StringInput `pulumi:"filename"` } func (SparkPoolSparkConfigArgs) ElementType() reflect.Type { return reflect.TypeOf((*SparkPoolSparkConfig)(nil)).Elem() } func (i SparkPoolSparkConfigArgs) ToSparkPoolSparkConfigOutput() SparkPoolSparkConfigOutput { return i.ToSparkPoolSparkConfigOutputWithContext(context.Background()) } func (i SparkPoolSparkConfigArgs) ToSparkPoolSparkConfigOutputWithContext(ctx context.Context) SparkPoolSparkConfigOutput { return pulumi.ToOutputWithContext(ctx, i).(SparkPoolSparkConfigOutput) } func (i SparkPoolSparkConfigArgs) ToSparkPoolSparkConfigPtrOutput() SparkPoolSparkConfigPtrOutput { return i.ToSparkPoolSparkConfigPtrOutputWithContext(context.Background()) } func (i SparkPoolSparkConfigArgs) ToSparkPoolSparkConfigPtrOutputWithContext(ctx context.Context) SparkPoolSparkConfigPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(SparkPoolSparkConfigOutput).ToSparkPoolSparkConfigPtrOutputWithContext(ctx) } // SparkPoolSparkConfigPtrInput is an input type that accepts SparkPoolSparkConfigArgs, SparkPoolSparkConfigPtr and SparkPoolSparkConfigPtrOutput values. // You can construct a concrete instance of `SparkPoolSparkConfigPtrInput` via: // // SparkPoolSparkConfigArgs{...} // // or: // // nil type SparkPoolSparkConfigPtrInput interface { pulumi.Input ToSparkPoolSparkConfigPtrOutput() SparkPoolSparkConfigPtrOutput ToSparkPoolSparkConfigPtrOutputWithContext(context.Context) SparkPoolSparkConfigPtrOutput } type sparkPoolSparkConfigPtrType SparkPoolSparkConfigArgs func SparkPoolSparkConfigPtr(v *SparkPoolSparkConfigArgs) SparkPoolSparkConfigPtrInput { return (*sparkPoolSparkConfigPtrType)(v) } func (*sparkPoolSparkConfigPtrType) ElementType() reflect.Type { return reflect.TypeOf((**SparkPoolSparkConfig)(nil)).Elem() } func (i *sparkPoolSparkConfigPtrType) ToSparkPoolSparkConfigPtrOutput() SparkPoolSparkConfigPtrOutput { return i.ToSparkPoolSparkConfigPtrOutputWithContext(context.Background()) } func (i *sparkPoolSparkConfigPtrType) ToSparkPoolSparkConfigPtrOutputWithContext(ctx context.Context) SparkPoolSparkConfigPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(SparkPoolSparkConfigPtrOutput) } type SparkPoolSparkConfigOutput struct{ *pulumi.OutputState } func (SparkPoolSparkConfigOutput) ElementType() reflect.Type { return reflect.TypeOf((*SparkPoolSparkConfig)(nil)).Elem() } func (o SparkPoolSparkConfigOutput) ToSparkPoolSparkConfigOutput() SparkPoolSparkConfigOutput { return o } func (o SparkPoolSparkConfigOutput) ToSparkPoolSparkConfigOutputWithContext(ctx context.Context) SparkPoolSparkConfigOutput { return o } func (o SparkPoolSparkConfigOutput) ToSparkPoolSparkConfigPtrOutput() SparkPoolSparkConfigPtrOutput { return o.ToSparkPoolSparkConfigPtrOutputWithContext(context.Background()) } func (o SparkPoolSparkConfigOutput) ToSparkPoolSparkConfigPtrOutputWithContext(ctx context.Context) SparkPoolSparkConfigPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v SparkPoolSparkConfig) *SparkPoolSparkConfig { return &v }).(SparkPoolSparkConfigPtrOutput) } // The contents of a spark configuration. func (o SparkPoolSparkConfigOutput) Content() pulumi.StringOutput { return o.ApplyT(func(v SparkPoolSparkConfig) string { return v.Content }).(pulumi.StringOutput) } // The name of the file where the spark configuration `content` will be stored. func (o SparkPoolSparkConfigOutput) Filename() pulumi.StringOutput { return o.ApplyT(func(v SparkPoolSparkConfig) string { return v.Filename }).(pulumi.StringOutput) } type SparkPoolSparkConfigPtrOutput struct{ *pulumi.OutputState } func (SparkPoolSparkConfigPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**SparkPoolSparkConfig)(nil)).Elem() } func (o SparkPoolSparkConfigPtrOutput) ToSparkPoolSparkConfigPtrOutput() SparkPoolSparkConfigPtrOutput { return o } func (o SparkPoolSparkConfigPtrOutput) ToSparkPoolSparkConfigPtrOutputWithContext(ctx context.Context) SparkPoolSparkConfigPtrOutput { return o } func (o SparkPoolSparkConfigPtrOutput) Elem() SparkPoolSparkConfigOutput { return o.ApplyT(func(v *SparkPoolSparkConfig) SparkPoolSparkConfig { if v != nil { return *v } var ret SparkPoolSparkConfig return ret }).(SparkPoolSparkConfigOutput) } // The contents of a spark configuration. func (o SparkPoolSparkConfigPtrOutput) Content() pulumi.StringPtrOutput { return o.ApplyT(func(v *SparkPoolSparkConfig) *string { if v == nil { return nil } return &v.Content }).(pulumi.StringPtrOutput) } // The name of the file where the spark configuration `content` will be stored. func (o SparkPoolSparkConfigPtrOutput) Filename() pulumi.StringPtrOutput { return o.ApplyT(func(v *SparkPoolSparkConfig) *string { if v == nil { return nil } return &v.Filename }).(pulumi.StringPtrOutput) } type SqlPoolRestore struct { // Specifies the Snapshot time to restore formatted as an RFC3339 date string. Changing this forces a new Synapse SQL Pool to be created. PointInTime string `pulumi:"pointInTime"` // The ID of the Synapse SQL Pool or SQL Database which is to restore. Changing this forces a new Synapse SQL Pool to be created. SourceDatabaseId string `pulumi:"sourceDatabaseId"` } // SqlPoolRestoreInput is an input type that accepts SqlPoolRestoreArgs and SqlPoolRestoreOutput values. // You can construct a concrete instance of `SqlPoolRestoreInput` via: // // SqlPoolRestoreArgs{...} type SqlPoolRestoreInput interface { pulumi.Input ToSqlPoolRestoreOutput() SqlPoolRestoreOutput ToSqlPoolRestoreOutputWithContext(context.Context) SqlPoolRestoreOutput } type SqlPoolRestoreArgs struct { // Specifies the Snapshot time to restore formatted as an RFC3339 date string. Changing this forces a new Synapse SQL Pool to be created. PointInTime pulumi.StringInput `pulumi:"pointInTime"` // The ID of the Synapse SQL Pool or SQL Database which is to restore. Changing this forces a new Synapse SQL Pool to be created. SourceDatabaseId pulumi.StringInput `pulumi:"sourceDatabaseId"` } func (SqlPoolRestoreArgs) ElementType() reflect.Type { return reflect.TypeOf((*SqlPoolRestore)(nil)).Elem() } func (i SqlPoolRestoreArgs) ToSqlPoolRestoreOutput() SqlPoolRestoreOutput { return i.ToSqlPoolRestoreOutputWithContext(context.Background()) } func (i SqlPoolRestoreArgs) ToSqlPoolRestoreOutputWithContext(ctx context.Context) SqlPoolRestoreOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolRestoreOutput) } func (i SqlPoolRestoreArgs) ToSqlPoolRestorePtrOutput() SqlPoolRestorePtrOutput { return i.ToSqlPoolRestorePtrOutputWithContext(context.Background()) } func (i SqlPoolRestoreArgs) ToSqlPoolRestorePtrOutputWithContext(ctx context.Context) SqlPoolRestorePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolRestoreOutput).ToSqlPoolRestorePtrOutputWithContext(ctx) } // SqlPoolRestorePtrInput is an input type that accepts SqlPoolRestoreArgs, SqlPoolRestorePtr and SqlPoolRestorePtrOutput values. // You can construct a concrete instance of `SqlPoolRestorePtrInput` via: // // SqlPoolRestoreArgs{...} // // or: // // nil type SqlPoolRestorePtrInput interface { pulumi.Input ToSqlPoolRestorePtrOutput() SqlPoolRestorePtrOutput ToSqlPoolRestorePtrOutputWithContext(context.Context) SqlPoolRestorePtrOutput } type sqlPoolRestorePtrType SqlPoolRestoreArgs
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/synapse/managedPrivateEndpoint.go
sdk/go/azure/synapse/managedPrivateEndpoint.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Synapse Managed Private Endpoint. // // ## 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("StorageV2"), // IsHnsEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // ManagedVirtualNetworkEnabled: pulumi.Bool(true), // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // exampleFirewallRule, err := synapse.NewFirewallRule(ctx, "example", &synapse.FirewallRuleArgs{ // Name: pulumi.String("AllowAll"), // SynapseWorkspaceId: exampleWorkspace.ID(), // StartIpAddress: pulumi.String("0.0.0.0"), // EndIpAddress: pulumi.String("255.255.255.255"), // }) // if err != nil { // return err // } // exampleConnect, err := storage.NewAccount(ctx, "example_connect", &storage.AccountArgs{ // Name: pulumi.String("examplestorage2"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("BlobStorage"), // }) // if err != nil { // return err // } // _, err = synapse.NewManagedPrivateEndpoint(ctx, "example", &synapse.ManagedPrivateEndpointArgs{ // Name: pulumi.String("example-endpoint"), // SynapseWorkspaceId: exampleWorkspace.ID(), // TargetResourceId: exampleConnect.ID(), // SubresourceName: pulumi.String("blob"), // }, pulumi.DependsOn([]pulumi.Resource{ // exampleFirewallRule, // })) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse Managed Private Endpoint can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/managedPrivateEndpoint:ManagedPrivateEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Synapse/workspaces/workspace1/managedVirtualNetworks/default/managedPrivateEndpoints/endpoint1 // ``` type ManagedPrivateEndpoint struct { pulumi.CustomResourceState // Specifies the name which should be used for this Managed Private Endpoint. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the sub resource name which the Synapse Private Endpoint is able to connect to. Changing this forces a new resource to be created. // // > **Note:** Possible values are listed in [documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-overview#dns-configuration). SubresourceName pulumi.StringOutput `pulumi:"subresourceName"` // The ID of the Synapse Workspace on which to create the Managed Private Endpoint. Changing this forces a new resource to be created. // // > **Note:** A Synapse firewall rule including local IP is needed for managing current resource. SynapseWorkspaceId pulumi.StringOutput `pulumi:"synapseWorkspaceId"` // The ID of the Private Link Enabled Remote Resource which this Synapse Private Endpoint should be connected to. Changing this forces a new resource to be created. TargetResourceId pulumi.StringOutput `pulumi:"targetResourceId"` } // NewManagedPrivateEndpoint registers a new resource with the given unique name, arguments, and options. func NewManagedPrivateEndpoint(ctx *pulumi.Context, name string, args *ManagedPrivateEndpointArgs, opts ...pulumi.ResourceOption) (*ManagedPrivateEndpoint, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.SubresourceName == nil { return nil, errors.New("invalid value for required argument 'SubresourceName'") } if args.SynapseWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'SynapseWorkspaceId'") } if args.TargetResourceId == nil { return nil, errors.New("invalid value for required argument 'TargetResourceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ManagedPrivateEndpoint err := ctx.RegisterResource("azure:synapse/managedPrivateEndpoint:ManagedPrivateEndpoint", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetManagedPrivateEndpoint gets an existing ManagedPrivateEndpoint 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 GetManagedPrivateEndpoint(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ManagedPrivateEndpointState, opts ...pulumi.ResourceOption) (*ManagedPrivateEndpoint, error) { var resource ManagedPrivateEndpoint err := ctx.ReadResource("azure:synapse/managedPrivateEndpoint:ManagedPrivateEndpoint", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ManagedPrivateEndpoint resources. type managedPrivateEndpointState struct { // Specifies the name which should be used for this Managed Private Endpoint. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the sub resource name which the Synapse Private Endpoint is able to connect to. Changing this forces a new resource to be created. // // > **Note:** Possible values are listed in [documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-overview#dns-configuration). SubresourceName *string `pulumi:"subresourceName"` // The ID of the Synapse Workspace on which to create the Managed Private Endpoint. Changing this forces a new resource to be created. // // > **Note:** A Synapse firewall rule including local IP is needed for managing current resource. SynapseWorkspaceId *string `pulumi:"synapseWorkspaceId"` // The ID of the Private Link Enabled Remote Resource which this Synapse Private Endpoint should be connected to. Changing this forces a new resource to be created. TargetResourceId *string `pulumi:"targetResourceId"` } type ManagedPrivateEndpointState struct { // Specifies the name which should be used for this Managed Private Endpoint. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the sub resource name which the Synapse Private Endpoint is able to connect to. Changing this forces a new resource to be created. // // > **Note:** Possible values are listed in [documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-overview#dns-configuration). SubresourceName pulumi.StringPtrInput // The ID of the Synapse Workspace on which to create the Managed Private Endpoint. Changing this forces a new resource to be created. // // > **Note:** A Synapse firewall rule including local IP is needed for managing current resource. SynapseWorkspaceId pulumi.StringPtrInput // The ID of the Private Link Enabled Remote Resource which this Synapse Private Endpoint should be connected to. Changing this forces a new resource to be created. TargetResourceId pulumi.StringPtrInput } func (ManagedPrivateEndpointState) ElementType() reflect.Type { return reflect.TypeOf((*managedPrivateEndpointState)(nil)).Elem() } type managedPrivateEndpointArgs struct { // Specifies the name which should be used for this Managed Private Endpoint. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the sub resource name which the Synapse Private Endpoint is able to connect to. Changing this forces a new resource to be created. // // > **Note:** Possible values are listed in [documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-overview#dns-configuration). SubresourceName string `pulumi:"subresourceName"` // The ID of the Synapse Workspace on which to create the Managed Private Endpoint. Changing this forces a new resource to be created. // // > **Note:** A Synapse firewall rule including local IP is needed for managing current resource. SynapseWorkspaceId string `pulumi:"synapseWorkspaceId"` // The ID of the Private Link Enabled Remote Resource which this Synapse Private Endpoint should be connected to. Changing this forces a new resource to be created. TargetResourceId string `pulumi:"targetResourceId"` } // The set of arguments for constructing a ManagedPrivateEndpoint resource. type ManagedPrivateEndpointArgs struct { // Specifies the name which should be used for this Managed Private Endpoint. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the sub resource name which the Synapse Private Endpoint is able to connect to. Changing this forces a new resource to be created. // // > **Note:** Possible values are listed in [documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-overview#dns-configuration). SubresourceName pulumi.StringInput // The ID of the Synapse Workspace on which to create the Managed Private Endpoint. Changing this forces a new resource to be created. // // > **Note:** A Synapse firewall rule including local IP is needed for managing current resource. SynapseWorkspaceId pulumi.StringInput // The ID of the Private Link Enabled Remote Resource which this Synapse Private Endpoint should be connected to. Changing this forces a new resource to be created. TargetResourceId pulumi.StringInput } func (ManagedPrivateEndpointArgs) ElementType() reflect.Type { return reflect.TypeOf((*managedPrivateEndpointArgs)(nil)).Elem() } type ManagedPrivateEndpointInput interface { pulumi.Input ToManagedPrivateEndpointOutput() ManagedPrivateEndpointOutput ToManagedPrivateEndpointOutputWithContext(ctx context.Context) ManagedPrivateEndpointOutput } func (*ManagedPrivateEndpoint) ElementType() reflect.Type { return reflect.TypeOf((**ManagedPrivateEndpoint)(nil)).Elem() } func (i *ManagedPrivateEndpoint) ToManagedPrivateEndpointOutput() ManagedPrivateEndpointOutput { return i.ToManagedPrivateEndpointOutputWithContext(context.Background()) } func (i *ManagedPrivateEndpoint) ToManagedPrivateEndpointOutputWithContext(ctx context.Context) ManagedPrivateEndpointOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedPrivateEndpointOutput) } // ManagedPrivateEndpointArrayInput is an input type that accepts ManagedPrivateEndpointArray and ManagedPrivateEndpointArrayOutput values. // You can construct a concrete instance of `ManagedPrivateEndpointArrayInput` via: // // ManagedPrivateEndpointArray{ ManagedPrivateEndpointArgs{...} } type ManagedPrivateEndpointArrayInput interface { pulumi.Input ToManagedPrivateEndpointArrayOutput() ManagedPrivateEndpointArrayOutput ToManagedPrivateEndpointArrayOutputWithContext(context.Context) ManagedPrivateEndpointArrayOutput } type ManagedPrivateEndpointArray []ManagedPrivateEndpointInput func (ManagedPrivateEndpointArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedPrivateEndpoint)(nil)).Elem() } func (i ManagedPrivateEndpointArray) ToManagedPrivateEndpointArrayOutput() ManagedPrivateEndpointArrayOutput { return i.ToManagedPrivateEndpointArrayOutputWithContext(context.Background()) } func (i ManagedPrivateEndpointArray) ToManagedPrivateEndpointArrayOutputWithContext(ctx context.Context) ManagedPrivateEndpointArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedPrivateEndpointArrayOutput) } // ManagedPrivateEndpointMapInput is an input type that accepts ManagedPrivateEndpointMap and ManagedPrivateEndpointMapOutput values. // You can construct a concrete instance of `ManagedPrivateEndpointMapInput` via: // // ManagedPrivateEndpointMap{ "key": ManagedPrivateEndpointArgs{...} } type ManagedPrivateEndpointMapInput interface { pulumi.Input ToManagedPrivateEndpointMapOutput() ManagedPrivateEndpointMapOutput ToManagedPrivateEndpointMapOutputWithContext(context.Context) ManagedPrivateEndpointMapOutput } type ManagedPrivateEndpointMap map[string]ManagedPrivateEndpointInput func (ManagedPrivateEndpointMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedPrivateEndpoint)(nil)).Elem() } func (i ManagedPrivateEndpointMap) ToManagedPrivateEndpointMapOutput() ManagedPrivateEndpointMapOutput { return i.ToManagedPrivateEndpointMapOutputWithContext(context.Background()) } func (i ManagedPrivateEndpointMap) ToManagedPrivateEndpointMapOutputWithContext(ctx context.Context) ManagedPrivateEndpointMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedPrivateEndpointMapOutput) } type ManagedPrivateEndpointOutput struct{ *pulumi.OutputState } func (ManagedPrivateEndpointOutput) ElementType() reflect.Type { return reflect.TypeOf((**ManagedPrivateEndpoint)(nil)).Elem() } func (o ManagedPrivateEndpointOutput) ToManagedPrivateEndpointOutput() ManagedPrivateEndpointOutput { return o } func (o ManagedPrivateEndpointOutput) ToManagedPrivateEndpointOutputWithContext(ctx context.Context) ManagedPrivateEndpointOutput { return o } // Specifies the name which should be used for this Managed Private Endpoint. Changing this forces a new resource to be created. func (o ManagedPrivateEndpointOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ManagedPrivateEndpoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the sub resource name which the Synapse Private Endpoint is able to connect to. Changing this forces a new resource to be created. // // > **Note:** Possible values are listed in [documentation](https://docs.microsoft.com/azure/private-link/private-endpoint-overview#dns-configuration). func (o ManagedPrivateEndpointOutput) SubresourceName() pulumi.StringOutput { return o.ApplyT(func(v *ManagedPrivateEndpoint) pulumi.StringOutput { return v.SubresourceName }).(pulumi.StringOutput) } // The ID of the Synapse Workspace on which to create the Managed Private Endpoint. Changing this forces a new resource to be created. // // > **Note:** A Synapse firewall rule including local IP is needed for managing current resource. func (o ManagedPrivateEndpointOutput) SynapseWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *ManagedPrivateEndpoint) pulumi.StringOutput { return v.SynapseWorkspaceId }).(pulumi.StringOutput) } // The ID of the Private Link Enabled Remote Resource which this Synapse Private Endpoint should be connected to. Changing this forces a new resource to be created. func (o ManagedPrivateEndpointOutput) TargetResourceId() pulumi.StringOutput { return o.ApplyT(func(v *ManagedPrivateEndpoint) pulumi.StringOutput { return v.TargetResourceId }).(pulumi.StringOutput) } type ManagedPrivateEndpointArrayOutput struct{ *pulumi.OutputState } func (ManagedPrivateEndpointArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedPrivateEndpoint)(nil)).Elem() } func (o ManagedPrivateEndpointArrayOutput) ToManagedPrivateEndpointArrayOutput() ManagedPrivateEndpointArrayOutput { return o } func (o ManagedPrivateEndpointArrayOutput) ToManagedPrivateEndpointArrayOutputWithContext(ctx context.Context) ManagedPrivateEndpointArrayOutput { return o } func (o ManagedPrivateEndpointArrayOutput) Index(i pulumi.IntInput) ManagedPrivateEndpointOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagedPrivateEndpoint { return vs[0].([]*ManagedPrivateEndpoint)[vs[1].(int)] }).(ManagedPrivateEndpointOutput) } type ManagedPrivateEndpointMapOutput struct{ *pulumi.OutputState } func (ManagedPrivateEndpointMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedPrivateEndpoint)(nil)).Elem() } func (o ManagedPrivateEndpointMapOutput) ToManagedPrivateEndpointMapOutput() ManagedPrivateEndpointMapOutput { return o } func (o ManagedPrivateEndpointMapOutput) ToManagedPrivateEndpointMapOutputWithContext(ctx context.Context) ManagedPrivateEndpointMapOutput { return o } func (o ManagedPrivateEndpointMapOutput) MapIndex(k pulumi.StringInput) ManagedPrivateEndpointOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagedPrivateEndpoint { return vs[0].(map[string]*ManagedPrivateEndpoint)[vs[1].(string)] }).(ManagedPrivateEndpointOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ManagedPrivateEndpointInput)(nil)).Elem(), &ManagedPrivateEndpoint{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedPrivateEndpointArrayInput)(nil)).Elem(), ManagedPrivateEndpointArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedPrivateEndpointMapInput)(nil)).Elem(), ManagedPrivateEndpointMap{}) pulumi.RegisterOutputType(ManagedPrivateEndpointOutput{}) pulumi.RegisterOutputType(ManagedPrivateEndpointArrayOutput{}) pulumi.RegisterOutputType(ManagedPrivateEndpointMapOutput{}) }
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/synapse/sqlPoolVulnerabilityAssessment.go
sdk/go/azure/synapse/sqlPoolVulnerabilityAssessment.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages the Vulnerability Assessment for a Synapse SQL Pool. // // ## 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("StorageV2"), // IsHnsEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{ // Name: pulumi.String("example"), // StorageAccountName: exampleAccount.Name, // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // AadAdmin: []map[string]interface{}{ // map[string]interface{}{ // "login": "AzureAD Admin", // "objectId": "00000000-0000-0000-0000-000000000000", // "tenantId": "00000000-0000-0000-0000-000000000000", // }, // }, // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // Tags: pulumi.StringMap{ // "Env": pulumi.String("production"), // }, // }) // if err != nil { // return err // } // exampleSqlPool, err := synapse.NewSqlPool(ctx, "example", &synapse.SqlPoolArgs{ // Name: pulumi.String("examplesqlpool"), // SynapseWorkspaceId: exampleWorkspace.ID(), // SkuName: pulumi.String("DW100c"), // CreateMode: pulumi.String("Default"), // }) // if err != nil { // return err // } // auditLogs, err := storage.NewAccount(ctx, "audit_logs", &storage.AccountArgs{ // Name: pulumi.String("examplesa"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleSqlPoolSecurityAlertPolicy, err := synapse.NewSqlPoolSecurityAlertPolicy(ctx, "example", &synapse.SqlPoolSecurityAlertPolicyArgs{ // SqlPoolId: exampleSqlPool.ID(), // PolicyState: pulumi.String("Enabled"), // StorageEndpoint: auditLogs.PrimaryBlobEndpoint, // StorageAccountAccessKey: auditLogs.PrimaryAccessKey, // DisabledAlerts: pulumi.StringArray{ // pulumi.String("Sql_Injection"), // pulumi.String("Data_Exfiltration"), // }, // RetentionDays: pulumi.Int(20), // }) // if err != nil { // return err // } // _, err = synapse.NewSqlPoolVulnerabilityAssessment(ctx, "example", &synapse.SqlPoolVulnerabilityAssessmentArgs{ // SqlPoolSecurityAlertPolicyId: exampleSqlPoolSecurityAlertPolicy.ID(), // StorageContainerPath: pulumi.All(exampleAccount.PrimaryBlobEndpoint, exampleContainer.Name).ApplyT(func(_args []interface{}) (string, error) { // primaryBlobEndpoint := _args[0].(string) // name := _args[1].(string) // return fmt.Sprintf("%v%v/", primaryBlobEndpoint, name), nil // }).(pulumi.StringOutput), // StorageAccountAccessKey: exampleAccount.PrimaryAccessKey, // RecurringScans: &synapse.SqlPoolVulnerabilityAssessmentRecurringScansArgs{ // Enabled: pulumi.Bool(true), // Emails: pulumi.StringArray{ // pulumi.String("email@example1.com"), // pulumi.String("email@example2.com"), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse SQL Pool Vulnerability Assessment can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/sqlPoolVulnerabilityAssessment:SqlPoolVulnerabilityAssessment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Synapse/workspaces/workspace1/sqlPools/sqlPool1/vulnerabilityAssessments/default // ``` type SqlPoolVulnerabilityAssessment struct { pulumi.CustomResourceState // The recurring scans settings. The `recurringScans` block supports fields documented below. RecurringScans SqlPoolVulnerabilityAssessmentRecurringScansOutput `pulumi:"recurringScans"` // The ID of the security alert policy of the Synapse SQL Pool. Changing this forces a new resource to be created. SqlPoolSecurityAlertPolicyId pulumi.StringOutput `pulumi:"sqlPoolSecurityAlertPolicyId"` // Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required. StorageAccountAccessKey pulumi.StringPtrOutput `pulumi:"storageAccountAccessKey"` // A blob storage container path to hold the scan results (e.g. <https://example.blob.core.windows.net/VaScans/>). StorageContainerPath pulumi.StringOutput `pulumi:"storageContainerPath"` // A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required. StorageContainerSasKey pulumi.StringPtrOutput `pulumi:"storageContainerSasKey"` } // NewSqlPoolVulnerabilityAssessment registers a new resource with the given unique name, arguments, and options. func NewSqlPoolVulnerabilityAssessment(ctx *pulumi.Context, name string, args *SqlPoolVulnerabilityAssessmentArgs, opts ...pulumi.ResourceOption) (*SqlPoolVulnerabilityAssessment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.SqlPoolSecurityAlertPolicyId == nil { return nil, errors.New("invalid value for required argument 'SqlPoolSecurityAlertPolicyId'") } if args.StorageContainerPath == nil { return nil, errors.New("invalid value for required argument 'StorageContainerPath'") } if args.StorageAccountAccessKey != nil { args.StorageAccountAccessKey = pulumi.ToSecret(args.StorageAccountAccessKey).(pulumi.StringPtrInput) } if args.StorageContainerSasKey != nil { args.StorageContainerSasKey = pulumi.ToSecret(args.StorageContainerSasKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "storageAccountAccessKey", "storageContainerSasKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource SqlPoolVulnerabilityAssessment err := ctx.RegisterResource("azure:synapse/sqlPoolVulnerabilityAssessment:SqlPoolVulnerabilityAssessment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSqlPoolVulnerabilityAssessment gets an existing SqlPoolVulnerabilityAssessment 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 GetSqlPoolVulnerabilityAssessment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SqlPoolVulnerabilityAssessmentState, opts ...pulumi.ResourceOption) (*SqlPoolVulnerabilityAssessment, error) { var resource SqlPoolVulnerabilityAssessment err := ctx.ReadResource("azure:synapse/sqlPoolVulnerabilityAssessment:SqlPoolVulnerabilityAssessment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SqlPoolVulnerabilityAssessment resources. type sqlPoolVulnerabilityAssessmentState struct { // The recurring scans settings. The `recurringScans` block supports fields documented below. RecurringScans *SqlPoolVulnerabilityAssessmentRecurringScans `pulumi:"recurringScans"` // The ID of the security alert policy of the Synapse SQL Pool. Changing this forces a new resource to be created. SqlPoolSecurityAlertPolicyId *string `pulumi:"sqlPoolSecurityAlertPolicyId"` // Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required. StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"` // A blob storage container path to hold the scan results (e.g. <https://example.blob.core.windows.net/VaScans/>). StorageContainerPath *string `pulumi:"storageContainerPath"` // A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required. StorageContainerSasKey *string `pulumi:"storageContainerSasKey"` } type SqlPoolVulnerabilityAssessmentState struct { // The recurring scans settings. The `recurringScans` block supports fields documented below. RecurringScans SqlPoolVulnerabilityAssessmentRecurringScansPtrInput // The ID of the security alert policy of the Synapse SQL Pool. Changing this forces a new resource to be created. SqlPoolSecurityAlertPolicyId pulumi.StringPtrInput // Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required. StorageAccountAccessKey pulumi.StringPtrInput // A blob storage container path to hold the scan results (e.g. <https://example.blob.core.windows.net/VaScans/>). StorageContainerPath pulumi.StringPtrInput // A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required. StorageContainerSasKey pulumi.StringPtrInput } func (SqlPoolVulnerabilityAssessmentState) ElementType() reflect.Type { return reflect.TypeOf((*sqlPoolVulnerabilityAssessmentState)(nil)).Elem() } type sqlPoolVulnerabilityAssessmentArgs struct { // The recurring scans settings. The `recurringScans` block supports fields documented below. RecurringScans *SqlPoolVulnerabilityAssessmentRecurringScans `pulumi:"recurringScans"` // The ID of the security alert policy of the Synapse SQL Pool. Changing this forces a new resource to be created. SqlPoolSecurityAlertPolicyId string `pulumi:"sqlPoolSecurityAlertPolicyId"` // Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required. StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"` // A blob storage container path to hold the scan results (e.g. <https://example.blob.core.windows.net/VaScans/>). StorageContainerPath string `pulumi:"storageContainerPath"` // A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required. StorageContainerSasKey *string `pulumi:"storageContainerSasKey"` } // The set of arguments for constructing a SqlPoolVulnerabilityAssessment resource. type SqlPoolVulnerabilityAssessmentArgs struct { // The recurring scans settings. The `recurringScans` block supports fields documented below. RecurringScans SqlPoolVulnerabilityAssessmentRecurringScansPtrInput // The ID of the security alert policy of the Synapse SQL Pool. Changing this forces a new resource to be created. SqlPoolSecurityAlertPolicyId pulumi.StringInput // Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required. StorageAccountAccessKey pulumi.StringPtrInput // A blob storage container path to hold the scan results (e.g. <https://example.blob.core.windows.net/VaScans/>). StorageContainerPath pulumi.StringInput // A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required. StorageContainerSasKey pulumi.StringPtrInput } func (SqlPoolVulnerabilityAssessmentArgs) ElementType() reflect.Type { return reflect.TypeOf((*sqlPoolVulnerabilityAssessmentArgs)(nil)).Elem() } type SqlPoolVulnerabilityAssessmentInput interface { pulumi.Input ToSqlPoolVulnerabilityAssessmentOutput() SqlPoolVulnerabilityAssessmentOutput ToSqlPoolVulnerabilityAssessmentOutputWithContext(ctx context.Context) SqlPoolVulnerabilityAssessmentOutput } func (*SqlPoolVulnerabilityAssessment) ElementType() reflect.Type { return reflect.TypeOf((**SqlPoolVulnerabilityAssessment)(nil)).Elem() } func (i *SqlPoolVulnerabilityAssessment) ToSqlPoolVulnerabilityAssessmentOutput() SqlPoolVulnerabilityAssessmentOutput { return i.ToSqlPoolVulnerabilityAssessmentOutputWithContext(context.Background()) } func (i *SqlPoolVulnerabilityAssessment) ToSqlPoolVulnerabilityAssessmentOutputWithContext(ctx context.Context) SqlPoolVulnerabilityAssessmentOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolVulnerabilityAssessmentOutput) } // SqlPoolVulnerabilityAssessmentArrayInput is an input type that accepts SqlPoolVulnerabilityAssessmentArray and SqlPoolVulnerabilityAssessmentArrayOutput values. // You can construct a concrete instance of `SqlPoolVulnerabilityAssessmentArrayInput` via: // // SqlPoolVulnerabilityAssessmentArray{ SqlPoolVulnerabilityAssessmentArgs{...} } type SqlPoolVulnerabilityAssessmentArrayInput interface { pulumi.Input ToSqlPoolVulnerabilityAssessmentArrayOutput() SqlPoolVulnerabilityAssessmentArrayOutput ToSqlPoolVulnerabilityAssessmentArrayOutputWithContext(context.Context) SqlPoolVulnerabilityAssessmentArrayOutput } type SqlPoolVulnerabilityAssessmentArray []SqlPoolVulnerabilityAssessmentInput func (SqlPoolVulnerabilityAssessmentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SqlPoolVulnerabilityAssessment)(nil)).Elem() } func (i SqlPoolVulnerabilityAssessmentArray) ToSqlPoolVulnerabilityAssessmentArrayOutput() SqlPoolVulnerabilityAssessmentArrayOutput { return i.ToSqlPoolVulnerabilityAssessmentArrayOutputWithContext(context.Background()) } func (i SqlPoolVulnerabilityAssessmentArray) ToSqlPoolVulnerabilityAssessmentArrayOutputWithContext(ctx context.Context) SqlPoolVulnerabilityAssessmentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolVulnerabilityAssessmentArrayOutput) } // SqlPoolVulnerabilityAssessmentMapInput is an input type that accepts SqlPoolVulnerabilityAssessmentMap and SqlPoolVulnerabilityAssessmentMapOutput values. // You can construct a concrete instance of `SqlPoolVulnerabilityAssessmentMapInput` via: // // SqlPoolVulnerabilityAssessmentMap{ "key": SqlPoolVulnerabilityAssessmentArgs{...} } type SqlPoolVulnerabilityAssessmentMapInput interface { pulumi.Input ToSqlPoolVulnerabilityAssessmentMapOutput() SqlPoolVulnerabilityAssessmentMapOutput ToSqlPoolVulnerabilityAssessmentMapOutputWithContext(context.Context) SqlPoolVulnerabilityAssessmentMapOutput } type SqlPoolVulnerabilityAssessmentMap map[string]SqlPoolVulnerabilityAssessmentInput func (SqlPoolVulnerabilityAssessmentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SqlPoolVulnerabilityAssessment)(nil)).Elem() } func (i SqlPoolVulnerabilityAssessmentMap) ToSqlPoolVulnerabilityAssessmentMapOutput() SqlPoolVulnerabilityAssessmentMapOutput { return i.ToSqlPoolVulnerabilityAssessmentMapOutputWithContext(context.Background()) } func (i SqlPoolVulnerabilityAssessmentMap) ToSqlPoolVulnerabilityAssessmentMapOutputWithContext(ctx context.Context) SqlPoolVulnerabilityAssessmentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolVulnerabilityAssessmentMapOutput) } type SqlPoolVulnerabilityAssessmentOutput struct{ *pulumi.OutputState } func (SqlPoolVulnerabilityAssessmentOutput) ElementType() reflect.Type { return reflect.TypeOf((**SqlPoolVulnerabilityAssessment)(nil)).Elem() } func (o SqlPoolVulnerabilityAssessmentOutput) ToSqlPoolVulnerabilityAssessmentOutput() SqlPoolVulnerabilityAssessmentOutput { return o } func (o SqlPoolVulnerabilityAssessmentOutput) ToSqlPoolVulnerabilityAssessmentOutputWithContext(ctx context.Context) SqlPoolVulnerabilityAssessmentOutput { return o } // The recurring scans settings. The `recurringScans` block supports fields documented below. func (o SqlPoolVulnerabilityAssessmentOutput) RecurringScans() SqlPoolVulnerabilityAssessmentRecurringScansOutput { return o.ApplyT(func(v *SqlPoolVulnerabilityAssessment) SqlPoolVulnerabilityAssessmentRecurringScansOutput { return v.RecurringScans }).(SqlPoolVulnerabilityAssessmentRecurringScansOutput) } // The ID of the security alert policy of the Synapse SQL Pool. Changing this forces a new resource to be created. func (o SqlPoolVulnerabilityAssessmentOutput) SqlPoolSecurityAlertPolicyId() pulumi.StringOutput { return o.ApplyT(func(v *SqlPoolVulnerabilityAssessment) pulumi.StringOutput { return v.SqlPoolSecurityAlertPolicyId }).(pulumi.StringOutput) } // Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required. func (o SqlPoolVulnerabilityAssessmentOutput) StorageAccountAccessKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *SqlPoolVulnerabilityAssessment) pulumi.StringPtrOutput { return v.StorageAccountAccessKey }).(pulumi.StringPtrOutput) } // A blob storage container path to hold the scan results (e.g. <https://example.blob.core.windows.net/VaScans/>). func (o SqlPoolVulnerabilityAssessmentOutput) StorageContainerPath() pulumi.StringOutput { return o.ApplyT(func(v *SqlPoolVulnerabilityAssessment) pulumi.StringOutput { return v.StorageContainerPath }).(pulumi.StringOutput) } // A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required. func (o SqlPoolVulnerabilityAssessmentOutput) StorageContainerSasKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *SqlPoolVulnerabilityAssessment) pulumi.StringPtrOutput { return v.StorageContainerSasKey }).(pulumi.StringPtrOutput) } type SqlPoolVulnerabilityAssessmentArrayOutput struct{ *pulumi.OutputState } func (SqlPoolVulnerabilityAssessmentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SqlPoolVulnerabilityAssessment)(nil)).Elem() } func (o SqlPoolVulnerabilityAssessmentArrayOutput) ToSqlPoolVulnerabilityAssessmentArrayOutput() SqlPoolVulnerabilityAssessmentArrayOutput { return o } func (o SqlPoolVulnerabilityAssessmentArrayOutput) ToSqlPoolVulnerabilityAssessmentArrayOutputWithContext(ctx context.Context) SqlPoolVulnerabilityAssessmentArrayOutput { return o } func (o SqlPoolVulnerabilityAssessmentArrayOutput) Index(i pulumi.IntInput) SqlPoolVulnerabilityAssessmentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SqlPoolVulnerabilityAssessment { return vs[0].([]*SqlPoolVulnerabilityAssessment)[vs[1].(int)] }).(SqlPoolVulnerabilityAssessmentOutput) } type SqlPoolVulnerabilityAssessmentMapOutput struct{ *pulumi.OutputState } func (SqlPoolVulnerabilityAssessmentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SqlPoolVulnerabilityAssessment)(nil)).Elem() } func (o SqlPoolVulnerabilityAssessmentMapOutput) ToSqlPoolVulnerabilityAssessmentMapOutput() SqlPoolVulnerabilityAssessmentMapOutput { return o } func (o SqlPoolVulnerabilityAssessmentMapOutput) ToSqlPoolVulnerabilityAssessmentMapOutputWithContext(ctx context.Context) SqlPoolVulnerabilityAssessmentMapOutput { return o } func (o SqlPoolVulnerabilityAssessmentMapOutput) MapIndex(k pulumi.StringInput) SqlPoolVulnerabilityAssessmentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SqlPoolVulnerabilityAssessment { return vs[0].(map[string]*SqlPoolVulnerabilityAssessment)[vs[1].(string)] }).(SqlPoolVulnerabilityAssessmentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolVulnerabilityAssessmentInput)(nil)).Elem(), &SqlPoolVulnerabilityAssessment{}) pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolVulnerabilityAssessmentArrayInput)(nil)).Elem(), SqlPoolVulnerabilityAssessmentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolVulnerabilityAssessmentMapInput)(nil)).Elem(), SqlPoolVulnerabilityAssessmentMap{}) pulumi.RegisterOutputType(SqlPoolVulnerabilityAssessmentOutput{}) pulumi.RegisterOutputType(SqlPoolVulnerabilityAssessmentArrayOutput{}) pulumi.RegisterOutputType(SqlPoolVulnerabilityAssessmentMapOutput{}) }
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/synapse/workspaceSecurityAlertPolicy.go
sdk/go/azure/synapse/workspaceSecurityAlertPolicy.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Security Alert Policy for a Synapse 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("StorageV2"), // IsHnsEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // AadAdmin: []map[string]interface{}{ // map[string]interface{}{ // "login": "AzureAD Admin", // "objectId": "00000000-0000-0000-0000-000000000000", // "tenantId": "00000000-0000-0000-0000-000000000000", // }, // }, // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // Tags: pulumi.StringMap{ // "Env": pulumi.String("production"), // }, // }) // if err != nil { // return err // } // auditLogs, err := storage.NewAccount(ctx, "audit_logs", &storage.AccountArgs{ // Name: pulumi.String("examplesa"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // _, err = synapse.NewWorkspaceSecurityAlertPolicy(ctx, "example", &synapse.WorkspaceSecurityAlertPolicyArgs{ // SynapseWorkspaceId: exampleWorkspace.ID(), // PolicyState: pulumi.String("Enabled"), // StorageEndpoint: auditLogs.PrimaryBlobEndpoint, // StorageAccountAccessKey: auditLogs.PrimaryAccessKey, // DisabledAlerts: pulumi.StringArray{ // pulumi.String("Sql_Injection"), // pulumi.String("Data_Exfiltration"), // }, // RetentionDays: pulumi.Int(20), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse Workspace Security Alert Policies can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/workspaceSecurityAlertPolicy:WorkspaceSecurityAlertPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Synapse/workspaces/workspace1/securityAlertPolicies/Default // ``` type WorkspaceSecurityAlertPolicy struct { pulumi.CustomResourceState // Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`. DisabledAlerts pulumi.StringArrayOutput `pulumi:"disabledAlerts"` // Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`. EmailAccountAdminsEnabled pulumi.BoolPtrOutput `pulumi:"emailAccountAdminsEnabled"` // Specifies an array of email addresses to which the alert is sent. EmailAddresses pulumi.StringArrayOutput `pulumi:"emailAddresses"` // Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific workspace. Possible values are `Disabled`, `Enabled` and `New`. PolicyState pulumi.StringOutput `pulumi:"policyState"` // Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`. RetentionDays pulumi.IntPtrOutput `pulumi:"retentionDays"` // Specifies the identifier key of the Threat Detection audit storage account. StorageAccountAccessKey pulumi.StringPtrOutput `pulumi:"storageAccountAccessKey"` // Specifies the blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all Threat Detection audit logs. StorageEndpoint pulumi.StringPtrOutput `pulumi:"storageEndpoint"` // Specifies the ID of the Synapse Workspace. Changing this forces a new resource to be created. SynapseWorkspaceId pulumi.StringOutput `pulumi:"synapseWorkspaceId"` } // NewWorkspaceSecurityAlertPolicy registers a new resource with the given unique name, arguments, and options. func NewWorkspaceSecurityAlertPolicy(ctx *pulumi.Context, name string, args *WorkspaceSecurityAlertPolicyArgs, opts ...pulumi.ResourceOption) (*WorkspaceSecurityAlertPolicy, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PolicyState == nil { return nil, errors.New("invalid value for required argument 'PolicyState'") } if args.SynapseWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'SynapseWorkspaceId'") } if args.StorageAccountAccessKey != nil { args.StorageAccountAccessKey = pulumi.ToSecret(args.StorageAccountAccessKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "storageAccountAccessKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource WorkspaceSecurityAlertPolicy err := ctx.RegisterResource("azure:synapse/workspaceSecurityAlertPolicy:WorkspaceSecurityAlertPolicy", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWorkspaceSecurityAlertPolicy gets an existing WorkspaceSecurityAlertPolicy 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 GetWorkspaceSecurityAlertPolicy(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WorkspaceSecurityAlertPolicyState, opts ...pulumi.ResourceOption) (*WorkspaceSecurityAlertPolicy, error) { var resource WorkspaceSecurityAlertPolicy err := ctx.ReadResource("azure:synapse/workspaceSecurityAlertPolicy:WorkspaceSecurityAlertPolicy", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering WorkspaceSecurityAlertPolicy resources. type workspaceSecurityAlertPolicyState struct { // Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`. DisabledAlerts []string `pulumi:"disabledAlerts"` // Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`. EmailAccountAdminsEnabled *bool `pulumi:"emailAccountAdminsEnabled"` // Specifies an array of email addresses to which the alert is sent. EmailAddresses []string `pulumi:"emailAddresses"` // Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific workspace. Possible values are `Disabled`, `Enabled` and `New`. PolicyState *string `pulumi:"policyState"` // Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`. RetentionDays *int `pulumi:"retentionDays"` // Specifies the identifier key of the Threat Detection audit storage account. StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"` // Specifies the blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all Threat Detection audit logs. StorageEndpoint *string `pulumi:"storageEndpoint"` // Specifies the ID of the Synapse Workspace. Changing this forces a new resource to be created. SynapseWorkspaceId *string `pulumi:"synapseWorkspaceId"` } type WorkspaceSecurityAlertPolicyState struct { // Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`. DisabledAlerts pulumi.StringArrayInput // Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`. EmailAccountAdminsEnabled pulumi.BoolPtrInput // Specifies an array of email addresses to which the alert is sent. EmailAddresses pulumi.StringArrayInput // Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific workspace. Possible values are `Disabled`, `Enabled` and `New`. PolicyState pulumi.StringPtrInput // Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`. RetentionDays pulumi.IntPtrInput // Specifies the identifier key of the Threat Detection audit storage account. StorageAccountAccessKey pulumi.StringPtrInput // Specifies the blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all Threat Detection audit logs. StorageEndpoint pulumi.StringPtrInput // Specifies the ID of the Synapse Workspace. Changing this forces a new resource to be created. SynapseWorkspaceId pulumi.StringPtrInput } func (WorkspaceSecurityAlertPolicyState) ElementType() reflect.Type { return reflect.TypeOf((*workspaceSecurityAlertPolicyState)(nil)).Elem() } type workspaceSecurityAlertPolicyArgs struct { // Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`. DisabledAlerts []string `pulumi:"disabledAlerts"` // Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`. EmailAccountAdminsEnabled *bool `pulumi:"emailAccountAdminsEnabled"` // Specifies an array of email addresses to which the alert is sent. EmailAddresses []string `pulumi:"emailAddresses"` // Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific workspace. Possible values are `Disabled`, `Enabled` and `New`. PolicyState string `pulumi:"policyState"` // Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`. RetentionDays *int `pulumi:"retentionDays"` // Specifies the identifier key of the Threat Detection audit storage account. StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"` // Specifies the blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all Threat Detection audit logs. StorageEndpoint *string `pulumi:"storageEndpoint"` // Specifies the ID of the Synapse Workspace. Changing this forces a new resource to be created. SynapseWorkspaceId string `pulumi:"synapseWorkspaceId"` } // The set of arguments for constructing a WorkspaceSecurityAlertPolicy resource. type WorkspaceSecurityAlertPolicyArgs struct { // Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`. DisabledAlerts pulumi.StringArrayInput // Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`. EmailAccountAdminsEnabled pulumi.BoolPtrInput // Specifies an array of email addresses to which the alert is sent. EmailAddresses pulumi.StringArrayInput // Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific workspace. Possible values are `Disabled`, `Enabled` and `New`. PolicyState pulumi.StringInput // Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`. RetentionDays pulumi.IntPtrInput // Specifies the identifier key of the Threat Detection audit storage account. StorageAccountAccessKey pulumi.StringPtrInput // Specifies the blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all Threat Detection audit logs. StorageEndpoint pulumi.StringPtrInput // Specifies the ID of the Synapse Workspace. Changing this forces a new resource to be created. SynapseWorkspaceId pulumi.StringInput } func (WorkspaceSecurityAlertPolicyArgs) ElementType() reflect.Type { return reflect.TypeOf((*workspaceSecurityAlertPolicyArgs)(nil)).Elem() } type WorkspaceSecurityAlertPolicyInput interface { pulumi.Input ToWorkspaceSecurityAlertPolicyOutput() WorkspaceSecurityAlertPolicyOutput ToWorkspaceSecurityAlertPolicyOutputWithContext(ctx context.Context) WorkspaceSecurityAlertPolicyOutput } func (*WorkspaceSecurityAlertPolicy) ElementType() reflect.Type { return reflect.TypeOf((**WorkspaceSecurityAlertPolicy)(nil)).Elem() } func (i *WorkspaceSecurityAlertPolicy) ToWorkspaceSecurityAlertPolicyOutput() WorkspaceSecurityAlertPolicyOutput { return i.ToWorkspaceSecurityAlertPolicyOutputWithContext(context.Background()) } func (i *WorkspaceSecurityAlertPolicy) ToWorkspaceSecurityAlertPolicyOutputWithContext(ctx context.Context) WorkspaceSecurityAlertPolicyOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceSecurityAlertPolicyOutput) } // WorkspaceSecurityAlertPolicyArrayInput is an input type that accepts WorkspaceSecurityAlertPolicyArray and WorkspaceSecurityAlertPolicyArrayOutput values. // You can construct a concrete instance of `WorkspaceSecurityAlertPolicyArrayInput` via: // // WorkspaceSecurityAlertPolicyArray{ WorkspaceSecurityAlertPolicyArgs{...} } type WorkspaceSecurityAlertPolicyArrayInput interface { pulumi.Input ToWorkspaceSecurityAlertPolicyArrayOutput() WorkspaceSecurityAlertPolicyArrayOutput ToWorkspaceSecurityAlertPolicyArrayOutputWithContext(context.Context) WorkspaceSecurityAlertPolicyArrayOutput } type WorkspaceSecurityAlertPolicyArray []WorkspaceSecurityAlertPolicyInput func (WorkspaceSecurityAlertPolicyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*WorkspaceSecurityAlertPolicy)(nil)).Elem() } func (i WorkspaceSecurityAlertPolicyArray) ToWorkspaceSecurityAlertPolicyArrayOutput() WorkspaceSecurityAlertPolicyArrayOutput { return i.ToWorkspaceSecurityAlertPolicyArrayOutputWithContext(context.Background()) } func (i WorkspaceSecurityAlertPolicyArray) ToWorkspaceSecurityAlertPolicyArrayOutputWithContext(ctx context.Context) WorkspaceSecurityAlertPolicyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceSecurityAlertPolicyArrayOutput) } // WorkspaceSecurityAlertPolicyMapInput is an input type that accepts WorkspaceSecurityAlertPolicyMap and WorkspaceSecurityAlertPolicyMapOutput values. // You can construct a concrete instance of `WorkspaceSecurityAlertPolicyMapInput` via: // // WorkspaceSecurityAlertPolicyMap{ "key": WorkspaceSecurityAlertPolicyArgs{...} } type WorkspaceSecurityAlertPolicyMapInput interface { pulumi.Input ToWorkspaceSecurityAlertPolicyMapOutput() WorkspaceSecurityAlertPolicyMapOutput ToWorkspaceSecurityAlertPolicyMapOutputWithContext(context.Context) WorkspaceSecurityAlertPolicyMapOutput } type WorkspaceSecurityAlertPolicyMap map[string]WorkspaceSecurityAlertPolicyInput func (WorkspaceSecurityAlertPolicyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WorkspaceSecurityAlertPolicy)(nil)).Elem() } func (i WorkspaceSecurityAlertPolicyMap) ToWorkspaceSecurityAlertPolicyMapOutput() WorkspaceSecurityAlertPolicyMapOutput { return i.ToWorkspaceSecurityAlertPolicyMapOutputWithContext(context.Background()) } func (i WorkspaceSecurityAlertPolicyMap) ToWorkspaceSecurityAlertPolicyMapOutputWithContext(ctx context.Context) WorkspaceSecurityAlertPolicyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceSecurityAlertPolicyMapOutput) } type WorkspaceSecurityAlertPolicyOutput struct{ *pulumi.OutputState } func (WorkspaceSecurityAlertPolicyOutput) ElementType() reflect.Type { return reflect.TypeOf((**WorkspaceSecurityAlertPolicy)(nil)).Elem() } func (o WorkspaceSecurityAlertPolicyOutput) ToWorkspaceSecurityAlertPolicyOutput() WorkspaceSecurityAlertPolicyOutput { return o } func (o WorkspaceSecurityAlertPolicyOutput) ToWorkspaceSecurityAlertPolicyOutputWithContext(ctx context.Context) WorkspaceSecurityAlertPolicyOutput { return o } // Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`. func (o WorkspaceSecurityAlertPolicyOutput) DisabledAlerts() pulumi.StringArrayOutput { return o.ApplyT(func(v *WorkspaceSecurityAlertPolicy) pulumi.StringArrayOutput { return v.DisabledAlerts }).(pulumi.StringArrayOutput) } // Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`. func (o WorkspaceSecurityAlertPolicyOutput) EmailAccountAdminsEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *WorkspaceSecurityAlertPolicy) pulumi.BoolPtrOutput { return v.EmailAccountAdminsEnabled }).(pulumi.BoolPtrOutput) } // Specifies an array of email addresses to which the alert is sent. func (o WorkspaceSecurityAlertPolicyOutput) EmailAddresses() pulumi.StringArrayOutput { return o.ApplyT(func(v *WorkspaceSecurityAlertPolicy) pulumi.StringArrayOutput { return v.EmailAddresses }).(pulumi.StringArrayOutput) } // Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific workspace. Possible values are `Disabled`, `Enabled` and `New`. func (o WorkspaceSecurityAlertPolicyOutput) PolicyState() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceSecurityAlertPolicy) pulumi.StringOutput { return v.PolicyState }).(pulumi.StringOutput) } // Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`. func (o WorkspaceSecurityAlertPolicyOutput) RetentionDays() pulumi.IntPtrOutput { return o.ApplyT(func(v *WorkspaceSecurityAlertPolicy) pulumi.IntPtrOutput { return v.RetentionDays }).(pulumi.IntPtrOutput) } // Specifies the identifier key of the Threat Detection audit storage account. func (o WorkspaceSecurityAlertPolicyOutput) StorageAccountAccessKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkspaceSecurityAlertPolicy) pulumi.StringPtrOutput { return v.StorageAccountAccessKey }).(pulumi.StringPtrOutput) } // Specifies the blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all Threat Detection audit logs. func (o WorkspaceSecurityAlertPolicyOutput) StorageEndpoint() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkspaceSecurityAlertPolicy) pulumi.StringPtrOutput { return v.StorageEndpoint }).(pulumi.StringPtrOutput) } // Specifies the ID of the Synapse Workspace. Changing this forces a new resource to be created. func (o WorkspaceSecurityAlertPolicyOutput) SynapseWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceSecurityAlertPolicy) pulumi.StringOutput { return v.SynapseWorkspaceId }).(pulumi.StringOutput) } type WorkspaceSecurityAlertPolicyArrayOutput struct{ *pulumi.OutputState } func (WorkspaceSecurityAlertPolicyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*WorkspaceSecurityAlertPolicy)(nil)).Elem() } func (o WorkspaceSecurityAlertPolicyArrayOutput) ToWorkspaceSecurityAlertPolicyArrayOutput() WorkspaceSecurityAlertPolicyArrayOutput { return o } func (o WorkspaceSecurityAlertPolicyArrayOutput) ToWorkspaceSecurityAlertPolicyArrayOutputWithContext(ctx context.Context) WorkspaceSecurityAlertPolicyArrayOutput { return o } func (o WorkspaceSecurityAlertPolicyArrayOutput) Index(i pulumi.IntInput) WorkspaceSecurityAlertPolicyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkspaceSecurityAlertPolicy { return vs[0].([]*WorkspaceSecurityAlertPolicy)[vs[1].(int)] }).(WorkspaceSecurityAlertPolicyOutput) } type WorkspaceSecurityAlertPolicyMapOutput struct{ *pulumi.OutputState } func (WorkspaceSecurityAlertPolicyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WorkspaceSecurityAlertPolicy)(nil)).Elem() } func (o WorkspaceSecurityAlertPolicyMapOutput) ToWorkspaceSecurityAlertPolicyMapOutput() WorkspaceSecurityAlertPolicyMapOutput { return o } func (o WorkspaceSecurityAlertPolicyMapOutput) ToWorkspaceSecurityAlertPolicyMapOutputWithContext(ctx context.Context) WorkspaceSecurityAlertPolicyMapOutput { return o } func (o WorkspaceSecurityAlertPolicyMapOutput) MapIndex(k pulumi.StringInput) WorkspaceSecurityAlertPolicyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkspaceSecurityAlertPolicy { return vs[0].(map[string]*WorkspaceSecurityAlertPolicy)[vs[1].(string)] }).(WorkspaceSecurityAlertPolicyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceSecurityAlertPolicyInput)(nil)).Elem(), &WorkspaceSecurityAlertPolicy{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceSecurityAlertPolicyArrayInput)(nil)).Elem(), WorkspaceSecurityAlertPolicyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceSecurityAlertPolicyMapInput)(nil)).Elem(), WorkspaceSecurityAlertPolicyMap{}) pulumi.RegisterOutputType(WorkspaceSecurityAlertPolicyOutput{}) pulumi.RegisterOutputType(WorkspaceSecurityAlertPolicyArrayOutput{}) pulumi.RegisterOutputType(WorkspaceSecurityAlertPolicyMapOutput{}) }
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/synapse/sqlPoolVulnerabilityAssessmentBaseline.go
sdk/go/azure/synapse/sqlPoolVulnerabilityAssessmentBaseline.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Synapse SQL Pool Vulnerability Assessment Rule Baseline. // // ## 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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"), // Location: pulumi.String("west europe"), // }) // if err != nil { // return err // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountKind: pulumi.String("BlobStorage"), // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // exampleSqlPool, err := synapse.NewSqlPool(ctx, "example", &synapse.SqlPoolArgs{ // Name: pulumi.String("example"), // SynapseWorkspaceId: exampleWorkspace.ID(), // SkuName: pulumi.String("DW100c"), // CreateMode: pulumi.String("Default"), // }) // if err != nil { // return err // } // exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{ // Name: pulumi.String("example"), // StorageAccountName: exampleAccount.Name, // ContainerAccessType: pulumi.String("private"), // }) // if err != nil { // return err // } // exampleSqlPoolSecurityAlertPolicy, err := synapse.NewSqlPoolSecurityAlertPolicy(ctx, "example", &synapse.SqlPoolSecurityAlertPolicyArgs{ // SqlPoolId: exampleSqlPool.ID(), // PolicyState: pulumi.String("Enabled"), // StorageEndpoint: exampleAccount.PrimaryBlobEndpoint, // StorageAccountAccessKey: exampleAccount.PrimaryAccessKey, // }) // if err != nil { // return err // } // exampleSqlPoolVulnerabilityAssessment, err := synapse.NewSqlPoolVulnerabilityAssessment(ctx, "example", &synapse.SqlPoolVulnerabilityAssessmentArgs{ // SqlPoolSecurityAlertPolicyId: exampleSqlPoolSecurityAlertPolicy.ID(), // StorageContainerPath: pulumi.All(exampleAccount.PrimaryBlobEndpoint, exampleContainer.Name).ApplyT(func(_args []interface{}) (string, error) { // primaryBlobEndpoint := _args[0].(string) // name := _args[1].(string) // return fmt.Sprintf("%v%v/", primaryBlobEndpoint, name), nil // }).(pulumi.StringOutput), // StorageAccountAccessKey: exampleAccount.PrimaryAccessKey, // }) // if err != nil { // return err // } // _, err = synapse.NewSqlPoolVulnerabilityAssessmentBaseline(ctx, "example", &synapse.SqlPoolVulnerabilityAssessmentBaselineArgs{ // Name: pulumi.String("default"), // RuleName: pulumi.String("VA1017"), // SqlPoolVulnerabilityAssessmentId: exampleSqlPoolVulnerabilityAssessment.ID(), // Baselines: synapse.SqlPoolVulnerabilityAssessmentBaselineBaselineArray{ // &synapse.SqlPoolVulnerabilityAssessmentBaselineBaselineArgs{ // Results: pulumi.StringArray{ // pulumi.String("userA"), // pulumi.String("SELECT"), // }, // }, // &synapse.SqlPoolVulnerabilityAssessmentBaselineBaselineArgs{ // Results: pulumi.StringArray{ // pulumi.String("userB"), // pulumi.String("SELECT"), // }, // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse SQL Pool Vulnerability Assessment Rule Baselines can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/sqlPoolVulnerabilityAssessmentBaseline:SqlPoolVulnerabilityAssessmentBaseline example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Synapse/workspaces/workspace1/sqlPools/sqlPool1/vulnerabilityAssessments/default/rules/rule1/baselines/baseline1 // ``` type SqlPoolVulnerabilityAssessmentBaseline struct { pulumi.CustomResourceState // One or more `baseline` blocks as defined below. Baselines SqlPoolVulnerabilityAssessmentBaselineBaselineArrayOutput `pulumi:"baselines"` // The name which should be used for this Synapse SQL Pool Vulnerability Assessment Rule Baseline. Name pulumi.StringOutput `pulumi:"name"` // The ID of the vulnerability assessment rule. RuleName pulumi.StringOutput `pulumi:"ruleName"` // The ID of the Synapse SQL Pool Vulnerability Assessment. Changing this forces a new Synapse SQL Pool Vulnerability Assessment Rule Baseline to be created. SqlPoolVulnerabilityAssessmentId pulumi.StringOutput `pulumi:"sqlPoolVulnerabilityAssessmentId"` } // NewSqlPoolVulnerabilityAssessmentBaseline registers a new resource with the given unique name, arguments, and options. func NewSqlPoolVulnerabilityAssessmentBaseline(ctx *pulumi.Context, name string, args *SqlPoolVulnerabilityAssessmentBaselineArgs, opts ...pulumi.ResourceOption) (*SqlPoolVulnerabilityAssessmentBaseline, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.RuleName == nil { return nil, errors.New("invalid value for required argument 'RuleName'") } if args.SqlPoolVulnerabilityAssessmentId == nil { return nil, errors.New("invalid value for required argument 'SqlPoolVulnerabilityAssessmentId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SqlPoolVulnerabilityAssessmentBaseline err := ctx.RegisterResource("azure:synapse/sqlPoolVulnerabilityAssessmentBaseline:SqlPoolVulnerabilityAssessmentBaseline", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSqlPoolVulnerabilityAssessmentBaseline gets an existing SqlPoolVulnerabilityAssessmentBaseline 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 GetSqlPoolVulnerabilityAssessmentBaseline(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SqlPoolVulnerabilityAssessmentBaselineState, opts ...pulumi.ResourceOption) (*SqlPoolVulnerabilityAssessmentBaseline, error) { var resource SqlPoolVulnerabilityAssessmentBaseline err := ctx.ReadResource("azure:synapse/sqlPoolVulnerabilityAssessmentBaseline:SqlPoolVulnerabilityAssessmentBaseline", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SqlPoolVulnerabilityAssessmentBaseline resources. type sqlPoolVulnerabilityAssessmentBaselineState struct { // One or more `baseline` blocks as defined below. Baselines []SqlPoolVulnerabilityAssessmentBaselineBaseline `pulumi:"baselines"` // The name which should be used for this Synapse SQL Pool Vulnerability Assessment Rule Baseline. Name *string `pulumi:"name"` // The ID of the vulnerability assessment rule. RuleName *string `pulumi:"ruleName"` // The ID of the Synapse SQL Pool Vulnerability Assessment. Changing this forces a new Synapse SQL Pool Vulnerability Assessment Rule Baseline to be created. SqlPoolVulnerabilityAssessmentId *string `pulumi:"sqlPoolVulnerabilityAssessmentId"` } type SqlPoolVulnerabilityAssessmentBaselineState struct { // One or more `baseline` blocks as defined below. Baselines SqlPoolVulnerabilityAssessmentBaselineBaselineArrayInput // The name which should be used for this Synapse SQL Pool Vulnerability Assessment Rule Baseline. Name pulumi.StringPtrInput // The ID of the vulnerability assessment rule. RuleName pulumi.StringPtrInput // The ID of the Synapse SQL Pool Vulnerability Assessment. Changing this forces a new Synapse SQL Pool Vulnerability Assessment Rule Baseline to be created. SqlPoolVulnerabilityAssessmentId pulumi.StringPtrInput } func (SqlPoolVulnerabilityAssessmentBaselineState) ElementType() reflect.Type { return reflect.TypeOf((*sqlPoolVulnerabilityAssessmentBaselineState)(nil)).Elem() } type sqlPoolVulnerabilityAssessmentBaselineArgs struct { // One or more `baseline` blocks as defined below. Baselines []SqlPoolVulnerabilityAssessmentBaselineBaseline `pulumi:"baselines"` // The name which should be used for this Synapse SQL Pool Vulnerability Assessment Rule Baseline. Name *string `pulumi:"name"` // The ID of the vulnerability assessment rule. RuleName string `pulumi:"ruleName"` // The ID of the Synapse SQL Pool Vulnerability Assessment. Changing this forces a new Synapse SQL Pool Vulnerability Assessment Rule Baseline to be created. SqlPoolVulnerabilityAssessmentId string `pulumi:"sqlPoolVulnerabilityAssessmentId"` } // The set of arguments for constructing a SqlPoolVulnerabilityAssessmentBaseline resource. type SqlPoolVulnerabilityAssessmentBaselineArgs struct { // One or more `baseline` blocks as defined below. Baselines SqlPoolVulnerabilityAssessmentBaselineBaselineArrayInput // The name which should be used for this Synapse SQL Pool Vulnerability Assessment Rule Baseline. Name pulumi.StringPtrInput // The ID of the vulnerability assessment rule. RuleName pulumi.StringInput // The ID of the Synapse SQL Pool Vulnerability Assessment. Changing this forces a new Synapse SQL Pool Vulnerability Assessment Rule Baseline to be created. SqlPoolVulnerabilityAssessmentId pulumi.StringInput } func (SqlPoolVulnerabilityAssessmentBaselineArgs) ElementType() reflect.Type { return reflect.TypeOf((*sqlPoolVulnerabilityAssessmentBaselineArgs)(nil)).Elem() } type SqlPoolVulnerabilityAssessmentBaselineInput interface { pulumi.Input ToSqlPoolVulnerabilityAssessmentBaselineOutput() SqlPoolVulnerabilityAssessmentBaselineOutput ToSqlPoolVulnerabilityAssessmentBaselineOutputWithContext(ctx context.Context) SqlPoolVulnerabilityAssessmentBaselineOutput } func (*SqlPoolVulnerabilityAssessmentBaseline) ElementType() reflect.Type { return reflect.TypeOf((**SqlPoolVulnerabilityAssessmentBaseline)(nil)).Elem() } func (i *SqlPoolVulnerabilityAssessmentBaseline) ToSqlPoolVulnerabilityAssessmentBaselineOutput() SqlPoolVulnerabilityAssessmentBaselineOutput { return i.ToSqlPoolVulnerabilityAssessmentBaselineOutputWithContext(context.Background()) } func (i *SqlPoolVulnerabilityAssessmentBaseline) ToSqlPoolVulnerabilityAssessmentBaselineOutputWithContext(ctx context.Context) SqlPoolVulnerabilityAssessmentBaselineOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolVulnerabilityAssessmentBaselineOutput) } // SqlPoolVulnerabilityAssessmentBaselineArrayInput is an input type that accepts SqlPoolVulnerabilityAssessmentBaselineArray and SqlPoolVulnerabilityAssessmentBaselineArrayOutput values. // You can construct a concrete instance of `SqlPoolVulnerabilityAssessmentBaselineArrayInput` via: // // SqlPoolVulnerabilityAssessmentBaselineArray{ SqlPoolVulnerabilityAssessmentBaselineArgs{...} } type SqlPoolVulnerabilityAssessmentBaselineArrayInput interface { pulumi.Input ToSqlPoolVulnerabilityAssessmentBaselineArrayOutput() SqlPoolVulnerabilityAssessmentBaselineArrayOutput ToSqlPoolVulnerabilityAssessmentBaselineArrayOutputWithContext(context.Context) SqlPoolVulnerabilityAssessmentBaselineArrayOutput } type SqlPoolVulnerabilityAssessmentBaselineArray []SqlPoolVulnerabilityAssessmentBaselineInput func (SqlPoolVulnerabilityAssessmentBaselineArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SqlPoolVulnerabilityAssessmentBaseline)(nil)).Elem() } func (i SqlPoolVulnerabilityAssessmentBaselineArray) ToSqlPoolVulnerabilityAssessmentBaselineArrayOutput() SqlPoolVulnerabilityAssessmentBaselineArrayOutput { return i.ToSqlPoolVulnerabilityAssessmentBaselineArrayOutputWithContext(context.Background()) } func (i SqlPoolVulnerabilityAssessmentBaselineArray) ToSqlPoolVulnerabilityAssessmentBaselineArrayOutputWithContext(ctx context.Context) SqlPoolVulnerabilityAssessmentBaselineArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolVulnerabilityAssessmentBaselineArrayOutput) } // SqlPoolVulnerabilityAssessmentBaselineMapInput is an input type that accepts SqlPoolVulnerabilityAssessmentBaselineMap and SqlPoolVulnerabilityAssessmentBaselineMapOutput values. // You can construct a concrete instance of `SqlPoolVulnerabilityAssessmentBaselineMapInput` via: // // SqlPoolVulnerabilityAssessmentBaselineMap{ "key": SqlPoolVulnerabilityAssessmentBaselineArgs{...} } type SqlPoolVulnerabilityAssessmentBaselineMapInput interface { pulumi.Input ToSqlPoolVulnerabilityAssessmentBaselineMapOutput() SqlPoolVulnerabilityAssessmentBaselineMapOutput ToSqlPoolVulnerabilityAssessmentBaselineMapOutputWithContext(context.Context) SqlPoolVulnerabilityAssessmentBaselineMapOutput } type SqlPoolVulnerabilityAssessmentBaselineMap map[string]SqlPoolVulnerabilityAssessmentBaselineInput func (SqlPoolVulnerabilityAssessmentBaselineMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SqlPoolVulnerabilityAssessmentBaseline)(nil)).Elem() } func (i SqlPoolVulnerabilityAssessmentBaselineMap) ToSqlPoolVulnerabilityAssessmentBaselineMapOutput() SqlPoolVulnerabilityAssessmentBaselineMapOutput { return i.ToSqlPoolVulnerabilityAssessmentBaselineMapOutputWithContext(context.Background()) } func (i SqlPoolVulnerabilityAssessmentBaselineMap) ToSqlPoolVulnerabilityAssessmentBaselineMapOutputWithContext(ctx context.Context) SqlPoolVulnerabilityAssessmentBaselineMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolVulnerabilityAssessmentBaselineMapOutput) } type SqlPoolVulnerabilityAssessmentBaselineOutput struct{ *pulumi.OutputState } func (SqlPoolVulnerabilityAssessmentBaselineOutput) ElementType() reflect.Type { return reflect.TypeOf((**SqlPoolVulnerabilityAssessmentBaseline)(nil)).Elem() } func (o SqlPoolVulnerabilityAssessmentBaselineOutput) ToSqlPoolVulnerabilityAssessmentBaselineOutput() SqlPoolVulnerabilityAssessmentBaselineOutput { return o } func (o SqlPoolVulnerabilityAssessmentBaselineOutput) ToSqlPoolVulnerabilityAssessmentBaselineOutputWithContext(ctx context.Context) SqlPoolVulnerabilityAssessmentBaselineOutput { return o } // One or more `baseline` blocks as defined below. func (o SqlPoolVulnerabilityAssessmentBaselineOutput) Baselines() SqlPoolVulnerabilityAssessmentBaselineBaselineArrayOutput { return o.ApplyT(func(v *SqlPoolVulnerabilityAssessmentBaseline) SqlPoolVulnerabilityAssessmentBaselineBaselineArrayOutput { return v.Baselines }).(SqlPoolVulnerabilityAssessmentBaselineBaselineArrayOutput) } // The name which should be used for this Synapse SQL Pool Vulnerability Assessment Rule Baseline. func (o SqlPoolVulnerabilityAssessmentBaselineOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SqlPoolVulnerabilityAssessmentBaseline) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the vulnerability assessment rule. func (o SqlPoolVulnerabilityAssessmentBaselineOutput) RuleName() pulumi.StringOutput { return o.ApplyT(func(v *SqlPoolVulnerabilityAssessmentBaseline) pulumi.StringOutput { return v.RuleName }).(pulumi.StringOutput) } // The ID of the Synapse SQL Pool Vulnerability Assessment. Changing this forces a new Synapse SQL Pool Vulnerability Assessment Rule Baseline to be created. func (o SqlPoolVulnerabilityAssessmentBaselineOutput) SqlPoolVulnerabilityAssessmentId() pulumi.StringOutput { return o.ApplyT(func(v *SqlPoolVulnerabilityAssessmentBaseline) pulumi.StringOutput { return v.SqlPoolVulnerabilityAssessmentId }).(pulumi.StringOutput) } type SqlPoolVulnerabilityAssessmentBaselineArrayOutput struct{ *pulumi.OutputState } func (SqlPoolVulnerabilityAssessmentBaselineArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SqlPoolVulnerabilityAssessmentBaseline)(nil)).Elem() } func (o SqlPoolVulnerabilityAssessmentBaselineArrayOutput) ToSqlPoolVulnerabilityAssessmentBaselineArrayOutput() SqlPoolVulnerabilityAssessmentBaselineArrayOutput { return o } func (o SqlPoolVulnerabilityAssessmentBaselineArrayOutput) ToSqlPoolVulnerabilityAssessmentBaselineArrayOutputWithContext(ctx context.Context) SqlPoolVulnerabilityAssessmentBaselineArrayOutput { return o } func (o SqlPoolVulnerabilityAssessmentBaselineArrayOutput) Index(i pulumi.IntInput) SqlPoolVulnerabilityAssessmentBaselineOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SqlPoolVulnerabilityAssessmentBaseline { return vs[0].([]*SqlPoolVulnerabilityAssessmentBaseline)[vs[1].(int)] }).(SqlPoolVulnerabilityAssessmentBaselineOutput) } type SqlPoolVulnerabilityAssessmentBaselineMapOutput struct{ *pulumi.OutputState } func (SqlPoolVulnerabilityAssessmentBaselineMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SqlPoolVulnerabilityAssessmentBaseline)(nil)).Elem() } func (o SqlPoolVulnerabilityAssessmentBaselineMapOutput) ToSqlPoolVulnerabilityAssessmentBaselineMapOutput() SqlPoolVulnerabilityAssessmentBaselineMapOutput { return o } func (o SqlPoolVulnerabilityAssessmentBaselineMapOutput) ToSqlPoolVulnerabilityAssessmentBaselineMapOutputWithContext(ctx context.Context) SqlPoolVulnerabilityAssessmentBaselineMapOutput { return o } func (o SqlPoolVulnerabilityAssessmentBaselineMapOutput) MapIndex(k pulumi.StringInput) SqlPoolVulnerabilityAssessmentBaselineOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SqlPoolVulnerabilityAssessmentBaseline { return vs[0].(map[string]*SqlPoolVulnerabilityAssessmentBaseline)[vs[1].(string)] }).(SqlPoolVulnerabilityAssessmentBaselineOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolVulnerabilityAssessmentBaselineInput)(nil)).Elem(), &SqlPoolVulnerabilityAssessmentBaseline{}) pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolVulnerabilityAssessmentBaselineArrayInput)(nil)).Elem(), SqlPoolVulnerabilityAssessmentBaselineArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolVulnerabilityAssessmentBaselineMapInput)(nil)).Elem(), SqlPoolVulnerabilityAssessmentBaselineMap{}) pulumi.RegisterOutputType(SqlPoolVulnerabilityAssessmentBaselineOutput{}) pulumi.RegisterOutputType(SqlPoolVulnerabilityAssessmentBaselineArrayOutput{}) pulumi.RegisterOutputType(SqlPoolVulnerabilityAssessmentBaselineMapOutput{}) }
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/synapse/workspaceKey.go
sdk/go/azure/synapse/workspaceKey.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages Synapse Workspace keys // // > **Note:** Keys that are actively protecting a workspace cannot be deleted. When the keys resource is deleted, if the key is inactive it will be deleted, if it is active it will not be deleted. // // ## 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/keyvault" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("StorageV2"), // IsHnsEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("example"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SkuName: pulumi.String("standard"), // PurgeProtectionEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // deployer, err := keyvault.NewAccessPolicy(ctx, "deployer", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Get"), // pulumi.String("Delete"), // pulumi.String("Purge"), // pulumi.String("GetRotationPolicy"), // }, // }) // if err != nil { // return err // } // exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{ // Name: pulumi.String("workspaceEncryptionKey"), // KeyVaultId: exampleKeyVault.ID(), // KeyType: pulumi.String("RSA"), // KeySize: pulumi.Int(2048), // KeyOpts: pulumi.StringArray{ // pulumi.String("unwrapKey"), // pulumi.String("wrapKey"), // }, // }, pulumi.DependsOn([]pulumi.Resource{ // deployer, // })) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // CustomerManagedKey: &synapse.WorkspaceCustomerManagedKeyArgs{ // KeyVersionlessId: exampleKey.VersionlessId, // KeyName: pulumi.String("enckey"), // }, // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // Tags: pulumi.StringMap{ // "Env": pulumi.String("production"), // }, // }) // if err != nil { // return err // } // workspacePolicy, err := keyvault.NewAccessPolicy(ctx, "workspace_policy", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(exampleWorkspace.Identity.ApplyT(func(identity synapse.WorkspaceIdentity) (*string, error) { // return &identity.TenantId, nil // }).(pulumi.StringPtrOutput)), // ObjectId: pulumi.String(exampleWorkspace.Identity.ApplyT(func(identity synapse.WorkspaceIdentity) (*string, error) { // return &identity.PrincipalId, nil // }).(pulumi.StringPtrOutput)), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Get"), // pulumi.String("WrapKey"), // pulumi.String("UnwrapKey"), // }, // }) // if err != nil { // return err // } // _, err = synapse.NewWorkspaceKey(ctx, "example", &synapse.WorkspaceKeyArgs{ // CustomerManagedKeyVersionlessId: exampleKey.VersionlessId, // SynapseWorkspaceId: exampleWorkspace.ID(), // Active: pulumi.Bool(true), // CustomerManagedKeyName: pulumi.String("enckey"), // }, pulumi.DependsOn([]pulumi.Resource{ // workspacePolicy, // })) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse Workspace Keys can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/workspaceKey:WorkspaceKey example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Synapse/workspaces/workspace1/keys/key1 // ``` type WorkspaceKey struct { pulumi.CustomResourceState // Specifies if the workspace should be encrypted with this key. // // > **Note:** Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys. Active pulumi.BoolOutput `pulumi:"active"` // Specifies the name of the workspace key. Should match the name of the key in the synapse workspace. CustomerManagedKeyName pulumi.StringOutput `pulumi:"customerManagedKeyName"` // The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption CustomerManagedKeyVersionlessId pulumi.StringPtrOutput `pulumi:"customerManagedKeyVersionlessId"` // The ID of the Synapse Workspace where the encryption key should be configured. SynapseWorkspaceId pulumi.StringOutput `pulumi:"synapseWorkspaceId"` } // NewWorkspaceKey registers a new resource with the given unique name, arguments, and options. func NewWorkspaceKey(ctx *pulumi.Context, name string, args *WorkspaceKeyArgs, opts ...pulumi.ResourceOption) (*WorkspaceKey, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Active == nil { return nil, errors.New("invalid value for required argument 'Active'") } if args.CustomerManagedKeyName == nil { return nil, errors.New("invalid value for required argument 'CustomerManagedKeyName'") } if args.SynapseWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'SynapseWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource WorkspaceKey err := ctx.RegisterResource("azure:synapse/workspaceKey:WorkspaceKey", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWorkspaceKey gets an existing WorkspaceKey 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 GetWorkspaceKey(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WorkspaceKeyState, opts ...pulumi.ResourceOption) (*WorkspaceKey, error) { var resource WorkspaceKey err := ctx.ReadResource("azure:synapse/workspaceKey:WorkspaceKey", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering WorkspaceKey resources. type workspaceKeyState struct { // Specifies if the workspace should be encrypted with this key. // // > **Note:** Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys. Active *bool `pulumi:"active"` // Specifies the name of the workspace key. Should match the name of the key in the synapse workspace. CustomerManagedKeyName *string `pulumi:"customerManagedKeyName"` // The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption CustomerManagedKeyVersionlessId *string `pulumi:"customerManagedKeyVersionlessId"` // The ID of the Synapse Workspace where the encryption key should be configured. SynapseWorkspaceId *string `pulumi:"synapseWorkspaceId"` } type WorkspaceKeyState struct { // Specifies if the workspace should be encrypted with this key. // // > **Note:** Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys. Active pulumi.BoolPtrInput // Specifies the name of the workspace key. Should match the name of the key in the synapse workspace. CustomerManagedKeyName pulumi.StringPtrInput // The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption CustomerManagedKeyVersionlessId pulumi.StringPtrInput // The ID of the Synapse Workspace where the encryption key should be configured. SynapseWorkspaceId pulumi.StringPtrInput } func (WorkspaceKeyState) ElementType() reflect.Type { return reflect.TypeOf((*workspaceKeyState)(nil)).Elem() } type workspaceKeyArgs struct { // Specifies if the workspace should be encrypted with this key. // // > **Note:** Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys. Active bool `pulumi:"active"` // Specifies the name of the workspace key. Should match the name of the key in the synapse workspace. CustomerManagedKeyName string `pulumi:"customerManagedKeyName"` // The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption CustomerManagedKeyVersionlessId *string `pulumi:"customerManagedKeyVersionlessId"` // The ID of the Synapse Workspace where the encryption key should be configured. SynapseWorkspaceId string `pulumi:"synapseWorkspaceId"` } // The set of arguments for constructing a WorkspaceKey resource. type WorkspaceKeyArgs struct { // Specifies if the workspace should be encrypted with this key. // // > **Note:** Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys. Active pulumi.BoolInput // Specifies the name of the workspace key. Should match the name of the key in the synapse workspace. CustomerManagedKeyName pulumi.StringInput // The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption CustomerManagedKeyVersionlessId pulumi.StringPtrInput // The ID of the Synapse Workspace where the encryption key should be configured. SynapseWorkspaceId pulumi.StringInput } func (WorkspaceKeyArgs) ElementType() reflect.Type { return reflect.TypeOf((*workspaceKeyArgs)(nil)).Elem() } type WorkspaceKeyInput interface { pulumi.Input ToWorkspaceKeyOutput() WorkspaceKeyOutput ToWorkspaceKeyOutputWithContext(ctx context.Context) WorkspaceKeyOutput } func (*WorkspaceKey) ElementType() reflect.Type { return reflect.TypeOf((**WorkspaceKey)(nil)).Elem() } func (i *WorkspaceKey) ToWorkspaceKeyOutput() WorkspaceKeyOutput { return i.ToWorkspaceKeyOutputWithContext(context.Background()) } func (i *WorkspaceKey) ToWorkspaceKeyOutputWithContext(ctx context.Context) WorkspaceKeyOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceKeyOutput) } // WorkspaceKeyArrayInput is an input type that accepts WorkspaceKeyArray and WorkspaceKeyArrayOutput values. // You can construct a concrete instance of `WorkspaceKeyArrayInput` via: // // WorkspaceKeyArray{ WorkspaceKeyArgs{...} } type WorkspaceKeyArrayInput interface { pulumi.Input ToWorkspaceKeyArrayOutput() WorkspaceKeyArrayOutput ToWorkspaceKeyArrayOutputWithContext(context.Context) WorkspaceKeyArrayOutput } type WorkspaceKeyArray []WorkspaceKeyInput func (WorkspaceKeyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*WorkspaceKey)(nil)).Elem() } func (i WorkspaceKeyArray) ToWorkspaceKeyArrayOutput() WorkspaceKeyArrayOutput { return i.ToWorkspaceKeyArrayOutputWithContext(context.Background()) } func (i WorkspaceKeyArray) ToWorkspaceKeyArrayOutputWithContext(ctx context.Context) WorkspaceKeyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceKeyArrayOutput) } // WorkspaceKeyMapInput is an input type that accepts WorkspaceKeyMap and WorkspaceKeyMapOutput values. // You can construct a concrete instance of `WorkspaceKeyMapInput` via: // // WorkspaceKeyMap{ "key": WorkspaceKeyArgs{...} } type WorkspaceKeyMapInput interface { pulumi.Input ToWorkspaceKeyMapOutput() WorkspaceKeyMapOutput ToWorkspaceKeyMapOutputWithContext(context.Context) WorkspaceKeyMapOutput } type WorkspaceKeyMap map[string]WorkspaceKeyInput func (WorkspaceKeyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WorkspaceKey)(nil)).Elem() } func (i WorkspaceKeyMap) ToWorkspaceKeyMapOutput() WorkspaceKeyMapOutput { return i.ToWorkspaceKeyMapOutputWithContext(context.Background()) } func (i WorkspaceKeyMap) ToWorkspaceKeyMapOutputWithContext(ctx context.Context) WorkspaceKeyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceKeyMapOutput) } type WorkspaceKeyOutput struct{ *pulumi.OutputState } func (WorkspaceKeyOutput) ElementType() reflect.Type { return reflect.TypeOf((**WorkspaceKey)(nil)).Elem() } func (o WorkspaceKeyOutput) ToWorkspaceKeyOutput() WorkspaceKeyOutput { return o } func (o WorkspaceKeyOutput) ToWorkspaceKeyOutputWithContext(ctx context.Context) WorkspaceKeyOutput { return o } // Specifies if the workspace should be encrypted with this key. // // > **Note:** Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys. func (o WorkspaceKeyOutput) Active() pulumi.BoolOutput { return o.ApplyT(func(v *WorkspaceKey) pulumi.BoolOutput { return v.Active }).(pulumi.BoolOutput) } // Specifies the name of the workspace key. Should match the name of the key in the synapse workspace. func (o WorkspaceKeyOutput) CustomerManagedKeyName() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceKey) pulumi.StringOutput { return v.CustomerManagedKeyName }).(pulumi.StringOutput) } // The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption func (o WorkspaceKeyOutput) CustomerManagedKeyVersionlessId() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkspaceKey) pulumi.StringPtrOutput { return v.CustomerManagedKeyVersionlessId }).(pulumi.StringPtrOutput) } // The ID of the Synapse Workspace where the encryption key should be configured. func (o WorkspaceKeyOutput) SynapseWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceKey) pulumi.StringOutput { return v.SynapseWorkspaceId }).(pulumi.StringOutput) } type WorkspaceKeyArrayOutput struct{ *pulumi.OutputState } func (WorkspaceKeyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*WorkspaceKey)(nil)).Elem() } func (o WorkspaceKeyArrayOutput) ToWorkspaceKeyArrayOutput() WorkspaceKeyArrayOutput { return o } func (o WorkspaceKeyArrayOutput) ToWorkspaceKeyArrayOutputWithContext(ctx context.Context) WorkspaceKeyArrayOutput { return o } func (o WorkspaceKeyArrayOutput) Index(i pulumi.IntInput) WorkspaceKeyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkspaceKey { return vs[0].([]*WorkspaceKey)[vs[1].(int)] }).(WorkspaceKeyOutput) } type WorkspaceKeyMapOutput struct{ *pulumi.OutputState } func (WorkspaceKeyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WorkspaceKey)(nil)).Elem() } func (o WorkspaceKeyMapOutput) ToWorkspaceKeyMapOutput() WorkspaceKeyMapOutput { return o } func (o WorkspaceKeyMapOutput) ToWorkspaceKeyMapOutputWithContext(ctx context.Context) WorkspaceKeyMapOutput { return o } func (o WorkspaceKeyMapOutput) MapIndex(k pulumi.StringInput) WorkspaceKeyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkspaceKey { return vs[0].(map[string]*WorkspaceKey)[vs[1].(string)] }).(WorkspaceKeyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceKeyInput)(nil)).Elem(), &WorkspaceKey{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceKeyArrayInput)(nil)).Elem(), WorkspaceKeyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceKeyMapInput)(nil)).Elem(), WorkspaceKeyMap{}) pulumi.RegisterOutputType(WorkspaceKeyOutput{}) pulumi.RegisterOutputType(WorkspaceKeyArrayOutput{}) pulumi.RegisterOutputType(WorkspaceKeyMapOutput{}) }
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/synapse/integrationRuntimeSelfHosted.go
sdk/go/azure/synapse/integrationRuntimeSelfHosted.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Synapse Self-hosted Integration Runtime. // // ## 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("example"), // Location: example.Location, // ResourceGroupName: example.Name, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // _, err = storage.NewContainer(ctx, "example", &storage.ContainerArgs{ // Name: pulumi.String("content"), // StorageAccountName: exampleAccount.Name, // ContainerAccessType: pulumi.String("private"), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // Location: example.Location, // ResourceGroupName: example.Name, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // ManagedVirtualNetworkEnabled: pulumi.Bool(true), // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // _, err = synapse.NewFirewallRule(ctx, "example", &synapse.FirewallRuleArgs{ // Name: pulumi.String("AllowAll"), // SynapseWorkspaceId: exampleWorkspace.ID(), // StartIpAddress: pulumi.String("0.0.0.0"), // EndIpAddress: pulumi.String("255.255.255.255"), // }) // if err != nil { // return err // } // _, err = synapse.NewIntegrationRuntimeSelfHosted(ctx, "example", &synapse.IntegrationRuntimeSelfHostedArgs{ // Name: pulumi.String("example"), // SynapseWorkspaceId: exampleWorkspace.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse Self-hosted Integration Runtimes can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/integrationRuntimeSelfHosted:IntegrationRuntimeSelfHosted example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Synapse/workspaces/workspace1/integrationRuntimes/IntegrationRuntime1 // ``` type IntegrationRuntimeSelfHosted struct { pulumi.CustomResourceState // The primary integration runtime authentication key. AuthorizationKeyPrimary pulumi.StringOutput `pulumi:"authorizationKeyPrimary"` // The secondary integration runtime authentication key. AuthorizationKeySecondary pulumi.StringOutput `pulumi:"authorizationKeySecondary"` // Integration runtime description. Description pulumi.StringPtrOutput `pulumi:"description"` // The name which should be used for this Synapse Self-hosted Integration Runtime. Changing this forces a new Synapse Self-hosted Integration Runtime to be created. Name pulumi.StringOutput `pulumi:"name"` // The Synapse Workspace ID in which to associate the Integration Runtime with. Changing this forces a new Synapse Self-hosted Integration Runtime to be created. SynapseWorkspaceId pulumi.StringOutput `pulumi:"synapseWorkspaceId"` } // NewIntegrationRuntimeSelfHosted registers a new resource with the given unique name, arguments, and options. func NewIntegrationRuntimeSelfHosted(ctx *pulumi.Context, name string, args *IntegrationRuntimeSelfHostedArgs, opts ...pulumi.ResourceOption) (*IntegrationRuntimeSelfHosted, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.SynapseWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'SynapseWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource IntegrationRuntimeSelfHosted err := ctx.RegisterResource("azure:synapse/integrationRuntimeSelfHosted:IntegrationRuntimeSelfHosted", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetIntegrationRuntimeSelfHosted gets an existing IntegrationRuntimeSelfHosted 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 GetIntegrationRuntimeSelfHosted(ctx *pulumi.Context, name string, id pulumi.IDInput, state *IntegrationRuntimeSelfHostedState, opts ...pulumi.ResourceOption) (*IntegrationRuntimeSelfHosted, error) { var resource IntegrationRuntimeSelfHosted err := ctx.ReadResource("azure:synapse/integrationRuntimeSelfHosted:IntegrationRuntimeSelfHosted", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering IntegrationRuntimeSelfHosted resources. type integrationRuntimeSelfHostedState struct { // The primary integration runtime authentication key. AuthorizationKeyPrimary *string `pulumi:"authorizationKeyPrimary"` // The secondary integration runtime authentication key. AuthorizationKeySecondary *string `pulumi:"authorizationKeySecondary"` // Integration runtime description. Description *string `pulumi:"description"` // The name which should be used for this Synapse Self-hosted Integration Runtime. Changing this forces a new Synapse Self-hosted Integration Runtime to be created. Name *string `pulumi:"name"` // The Synapse Workspace ID in which to associate the Integration Runtime with. Changing this forces a new Synapse Self-hosted Integration Runtime to be created. SynapseWorkspaceId *string `pulumi:"synapseWorkspaceId"` } type IntegrationRuntimeSelfHostedState struct { // The primary integration runtime authentication key. AuthorizationKeyPrimary pulumi.StringPtrInput // The secondary integration runtime authentication key. AuthorizationKeySecondary pulumi.StringPtrInput // Integration runtime description. Description pulumi.StringPtrInput // The name which should be used for this Synapse Self-hosted Integration Runtime. Changing this forces a new Synapse Self-hosted Integration Runtime to be created. Name pulumi.StringPtrInput // The Synapse Workspace ID in which to associate the Integration Runtime with. Changing this forces a new Synapse Self-hosted Integration Runtime to be created. SynapseWorkspaceId pulumi.StringPtrInput } func (IntegrationRuntimeSelfHostedState) ElementType() reflect.Type { return reflect.TypeOf((*integrationRuntimeSelfHostedState)(nil)).Elem() } type integrationRuntimeSelfHostedArgs struct { // Integration runtime description. Description *string `pulumi:"description"` // The name which should be used for this Synapse Self-hosted Integration Runtime. Changing this forces a new Synapse Self-hosted Integration Runtime to be created. Name *string `pulumi:"name"` // The Synapse Workspace ID in which to associate the Integration Runtime with. Changing this forces a new Synapse Self-hosted Integration Runtime to be created. SynapseWorkspaceId string `pulumi:"synapseWorkspaceId"` } // The set of arguments for constructing a IntegrationRuntimeSelfHosted resource. type IntegrationRuntimeSelfHostedArgs struct { // Integration runtime description. Description pulumi.StringPtrInput // The name which should be used for this Synapse Self-hosted Integration Runtime. Changing this forces a new Synapse Self-hosted Integration Runtime to be created. Name pulumi.StringPtrInput // The Synapse Workspace ID in which to associate the Integration Runtime with. Changing this forces a new Synapse Self-hosted Integration Runtime to be created. SynapseWorkspaceId pulumi.StringInput } func (IntegrationRuntimeSelfHostedArgs) ElementType() reflect.Type { return reflect.TypeOf((*integrationRuntimeSelfHostedArgs)(nil)).Elem() } type IntegrationRuntimeSelfHostedInput interface { pulumi.Input ToIntegrationRuntimeSelfHostedOutput() IntegrationRuntimeSelfHostedOutput ToIntegrationRuntimeSelfHostedOutputWithContext(ctx context.Context) IntegrationRuntimeSelfHostedOutput } func (*IntegrationRuntimeSelfHosted) ElementType() reflect.Type { return reflect.TypeOf((**IntegrationRuntimeSelfHosted)(nil)).Elem() } func (i *IntegrationRuntimeSelfHosted) ToIntegrationRuntimeSelfHostedOutput() IntegrationRuntimeSelfHostedOutput { return i.ToIntegrationRuntimeSelfHostedOutputWithContext(context.Background()) } func (i *IntegrationRuntimeSelfHosted) ToIntegrationRuntimeSelfHostedOutputWithContext(ctx context.Context) IntegrationRuntimeSelfHostedOutput { return pulumi.ToOutputWithContext(ctx, i).(IntegrationRuntimeSelfHostedOutput) } // IntegrationRuntimeSelfHostedArrayInput is an input type that accepts IntegrationRuntimeSelfHostedArray and IntegrationRuntimeSelfHostedArrayOutput values. // You can construct a concrete instance of `IntegrationRuntimeSelfHostedArrayInput` via: // // IntegrationRuntimeSelfHostedArray{ IntegrationRuntimeSelfHostedArgs{...} } type IntegrationRuntimeSelfHostedArrayInput interface { pulumi.Input ToIntegrationRuntimeSelfHostedArrayOutput() IntegrationRuntimeSelfHostedArrayOutput ToIntegrationRuntimeSelfHostedArrayOutputWithContext(context.Context) IntegrationRuntimeSelfHostedArrayOutput } type IntegrationRuntimeSelfHostedArray []IntegrationRuntimeSelfHostedInput func (IntegrationRuntimeSelfHostedArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*IntegrationRuntimeSelfHosted)(nil)).Elem() } func (i IntegrationRuntimeSelfHostedArray) ToIntegrationRuntimeSelfHostedArrayOutput() IntegrationRuntimeSelfHostedArrayOutput { return i.ToIntegrationRuntimeSelfHostedArrayOutputWithContext(context.Background()) } func (i IntegrationRuntimeSelfHostedArray) ToIntegrationRuntimeSelfHostedArrayOutputWithContext(ctx context.Context) IntegrationRuntimeSelfHostedArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(IntegrationRuntimeSelfHostedArrayOutput) } // IntegrationRuntimeSelfHostedMapInput is an input type that accepts IntegrationRuntimeSelfHostedMap and IntegrationRuntimeSelfHostedMapOutput values. // You can construct a concrete instance of `IntegrationRuntimeSelfHostedMapInput` via: // // IntegrationRuntimeSelfHostedMap{ "key": IntegrationRuntimeSelfHostedArgs{...} } type IntegrationRuntimeSelfHostedMapInput interface { pulumi.Input ToIntegrationRuntimeSelfHostedMapOutput() IntegrationRuntimeSelfHostedMapOutput ToIntegrationRuntimeSelfHostedMapOutputWithContext(context.Context) IntegrationRuntimeSelfHostedMapOutput } type IntegrationRuntimeSelfHostedMap map[string]IntegrationRuntimeSelfHostedInput func (IntegrationRuntimeSelfHostedMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*IntegrationRuntimeSelfHosted)(nil)).Elem() } func (i IntegrationRuntimeSelfHostedMap) ToIntegrationRuntimeSelfHostedMapOutput() IntegrationRuntimeSelfHostedMapOutput { return i.ToIntegrationRuntimeSelfHostedMapOutputWithContext(context.Background()) } func (i IntegrationRuntimeSelfHostedMap) ToIntegrationRuntimeSelfHostedMapOutputWithContext(ctx context.Context) IntegrationRuntimeSelfHostedMapOutput { return pulumi.ToOutputWithContext(ctx, i).(IntegrationRuntimeSelfHostedMapOutput) } type IntegrationRuntimeSelfHostedOutput struct{ *pulumi.OutputState } func (IntegrationRuntimeSelfHostedOutput) ElementType() reflect.Type { return reflect.TypeOf((**IntegrationRuntimeSelfHosted)(nil)).Elem() } func (o IntegrationRuntimeSelfHostedOutput) ToIntegrationRuntimeSelfHostedOutput() IntegrationRuntimeSelfHostedOutput { return o } func (o IntegrationRuntimeSelfHostedOutput) ToIntegrationRuntimeSelfHostedOutputWithContext(ctx context.Context) IntegrationRuntimeSelfHostedOutput { return o } // The primary integration runtime authentication key. func (o IntegrationRuntimeSelfHostedOutput) AuthorizationKeyPrimary() pulumi.StringOutput { return o.ApplyT(func(v *IntegrationRuntimeSelfHosted) pulumi.StringOutput { return v.AuthorizationKeyPrimary }).(pulumi.StringOutput) } // The secondary integration runtime authentication key. func (o IntegrationRuntimeSelfHostedOutput) AuthorizationKeySecondary() pulumi.StringOutput { return o.ApplyT(func(v *IntegrationRuntimeSelfHosted) pulumi.StringOutput { return v.AuthorizationKeySecondary }).(pulumi.StringOutput) } // Integration runtime description. func (o IntegrationRuntimeSelfHostedOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *IntegrationRuntimeSelfHosted) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The name which should be used for this Synapse Self-hosted Integration Runtime. Changing this forces a new Synapse Self-hosted Integration Runtime to be created. func (o IntegrationRuntimeSelfHostedOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *IntegrationRuntimeSelfHosted) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The Synapse Workspace ID in which to associate the Integration Runtime with. Changing this forces a new Synapse Self-hosted Integration Runtime to be created. func (o IntegrationRuntimeSelfHostedOutput) SynapseWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *IntegrationRuntimeSelfHosted) pulumi.StringOutput { return v.SynapseWorkspaceId }).(pulumi.StringOutput) } type IntegrationRuntimeSelfHostedArrayOutput struct{ *pulumi.OutputState } func (IntegrationRuntimeSelfHostedArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*IntegrationRuntimeSelfHosted)(nil)).Elem() } func (o IntegrationRuntimeSelfHostedArrayOutput) ToIntegrationRuntimeSelfHostedArrayOutput() IntegrationRuntimeSelfHostedArrayOutput { return o } func (o IntegrationRuntimeSelfHostedArrayOutput) ToIntegrationRuntimeSelfHostedArrayOutputWithContext(ctx context.Context) IntegrationRuntimeSelfHostedArrayOutput { return o } func (o IntegrationRuntimeSelfHostedArrayOutput) Index(i pulumi.IntInput) IntegrationRuntimeSelfHostedOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IntegrationRuntimeSelfHosted { return vs[0].([]*IntegrationRuntimeSelfHosted)[vs[1].(int)] }).(IntegrationRuntimeSelfHostedOutput) } type IntegrationRuntimeSelfHostedMapOutput struct{ *pulumi.OutputState } func (IntegrationRuntimeSelfHostedMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*IntegrationRuntimeSelfHosted)(nil)).Elem() } func (o IntegrationRuntimeSelfHostedMapOutput) ToIntegrationRuntimeSelfHostedMapOutput() IntegrationRuntimeSelfHostedMapOutput { return o } func (o IntegrationRuntimeSelfHostedMapOutput) ToIntegrationRuntimeSelfHostedMapOutputWithContext(ctx context.Context) IntegrationRuntimeSelfHostedMapOutput { return o } func (o IntegrationRuntimeSelfHostedMapOutput) MapIndex(k pulumi.StringInput) IntegrationRuntimeSelfHostedOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IntegrationRuntimeSelfHosted { return vs[0].(map[string]*IntegrationRuntimeSelfHosted)[vs[1].(string)] }).(IntegrationRuntimeSelfHostedOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*IntegrationRuntimeSelfHostedInput)(nil)).Elem(), &IntegrationRuntimeSelfHosted{}) pulumi.RegisterInputType(reflect.TypeOf((*IntegrationRuntimeSelfHostedArrayInput)(nil)).Elem(), IntegrationRuntimeSelfHostedArray{}) pulumi.RegisterInputType(reflect.TypeOf((*IntegrationRuntimeSelfHostedMapInput)(nil)).Elem(), IntegrationRuntimeSelfHostedMap{}) pulumi.RegisterOutputType(IntegrationRuntimeSelfHostedOutput{}) pulumi.RegisterOutputType(IntegrationRuntimeSelfHostedArrayOutput{}) pulumi.RegisterOutputType(IntegrationRuntimeSelfHostedMapOutput{}) }
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/synapse/sqlPoolWorkloadClassifier.go
sdk/go/azure/synapse/sqlPoolWorkloadClassifier.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Synapse SQL Pool Workload Classifier. // // ## 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountKind: pulumi.String("BlobStorage"), // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // exampleSqlPool, err := synapse.NewSqlPool(ctx, "example", &synapse.SqlPoolArgs{ // Name: pulumi.String("example"), // SynapseWorkspaceId: exampleWorkspace.ID(), // SkuName: pulumi.String("DW100c"), // CreateMode: pulumi.String("Default"), // }) // if err != nil { // return err // } // exampleSqlPoolWorkloadGroup, err := synapse.NewSqlPoolWorkloadGroup(ctx, "example", &synapse.SqlPoolWorkloadGroupArgs{ // Name: pulumi.String("example"), // SqlPoolId: exampleSqlPool.ID(), // Importance: pulumi.String("normal"), // MaxResourcePercent: pulumi.Int(100), // MinResourcePercent: pulumi.Int(0), // MaxResourcePercentPerRequest: pulumi.Float64(3), // MinResourcePercentPerRequest: pulumi.Float64(3), // QueryExecutionTimeoutInSeconds: pulumi.Int(0), // }) // if err != nil { // return err // } // _, err = synapse.NewSqlPoolWorkloadClassifier(ctx, "example", &synapse.SqlPoolWorkloadClassifierArgs{ // Name: pulumi.String("example"), // WorkloadGroupId: exampleSqlPoolWorkloadGroup.ID(), // Context: pulumi.String("example_context"), // EndTime: pulumi.String("14:00"), // Importance: pulumi.String("high"), // Label: pulumi.String("example_label"), // MemberName: pulumi.String("dbo"), // StartTime: pulumi.String("12:00"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse SQL Pool Workload Classifiers can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/sqlPoolWorkloadClassifier:SqlPoolWorkloadClassifier example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Synapse/workspaces/workspace1/sqlPools/sqlPool1/workloadGroups/workloadGroup1/workloadClassifiers/workloadClassifier1 // ``` type SqlPoolWorkloadClassifier struct { pulumi.CustomResourceState // Specifies the session context value that a request can be classified against. Context pulumi.StringPtrOutput `pulumi:"context"` // The workload classifier end time for classification. It's of the `HH:MM` format in UTC time zone. EndTime pulumi.StringPtrOutput `pulumi:"endTime"` // The workload classifier importance. The allowed values are `low`, `belowNormal`, `normal`, `aboveNormal` and `high`. Importance pulumi.StringPtrOutput `pulumi:"importance"` // Specifies the label value that a request can be classified against. Label pulumi.StringPtrOutput `pulumi:"label"` // The workload classifier member name used to classified against. MemberName pulumi.StringOutput `pulumi:"memberName"` // The name which should be used for this Synapse SQL Pool Workload Classifier. Changing this forces a new Synapse SQL Pool Workload Classifier to be created. Name pulumi.StringOutput `pulumi:"name"` // The workload classifier start time for classification. It's of the `HH:MM` format in UTC time zone. StartTime pulumi.StringPtrOutput `pulumi:"startTime"` // The ID of the Synapse SQL Pool Workload Group. Changing this forces a new Synapse SQL Pool Workload Classifier to be created. WorkloadGroupId pulumi.StringOutput `pulumi:"workloadGroupId"` } // NewSqlPoolWorkloadClassifier registers a new resource with the given unique name, arguments, and options. func NewSqlPoolWorkloadClassifier(ctx *pulumi.Context, name string, args *SqlPoolWorkloadClassifierArgs, opts ...pulumi.ResourceOption) (*SqlPoolWorkloadClassifier, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.MemberName == nil { return nil, errors.New("invalid value for required argument 'MemberName'") } if args.WorkloadGroupId == nil { return nil, errors.New("invalid value for required argument 'WorkloadGroupId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SqlPoolWorkloadClassifier err := ctx.RegisterResource("azure:synapse/sqlPoolWorkloadClassifier:SqlPoolWorkloadClassifier", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSqlPoolWorkloadClassifier gets an existing SqlPoolWorkloadClassifier 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 GetSqlPoolWorkloadClassifier(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SqlPoolWorkloadClassifierState, opts ...pulumi.ResourceOption) (*SqlPoolWorkloadClassifier, error) { var resource SqlPoolWorkloadClassifier err := ctx.ReadResource("azure:synapse/sqlPoolWorkloadClassifier:SqlPoolWorkloadClassifier", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SqlPoolWorkloadClassifier resources. type sqlPoolWorkloadClassifierState struct { // Specifies the session context value that a request can be classified against. Context *string `pulumi:"context"` // The workload classifier end time for classification. It's of the `HH:MM` format in UTC time zone. EndTime *string `pulumi:"endTime"` // The workload classifier importance. The allowed values are `low`, `belowNormal`, `normal`, `aboveNormal` and `high`. Importance *string `pulumi:"importance"` // Specifies the label value that a request can be classified against. Label *string `pulumi:"label"` // The workload classifier member name used to classified against. MemberName *string `pulumi:"memberName"` // The name which should be used for this Synapse SQL Pool Workload Classifier. Changing this forces a new Synapse SQL Pool Workload Classifier to be created. Name *string `pulumi:"name"` // The workload classifier start time for classification. It's of the `HH:MM` format in UTC time zone. StartTime *string `pulumi:"startTime"` // The ID of the Synapse SQL Pool Workload Group. Changing this forces a new Synapse SQL Pool Workload Classifier to be created. WorkloadGroupId *string `pulumi:"workloadGroupId"` } type SqlPoolWorkloadClassifierState struct { // Specifies the session context value that a request can be classified against. Context pulumi.StringPtrInput // The workload classifier end time for classification. It's of the `HH:MM` format in UTC time zone. EndTime pulumi.StringPtrInput // The workload classifier importance. The allowed values are `low`, `belowNormal`, `normal`, `aboveNormal` and `high`. Importance pulumi.StringPtrInput // Specifies the label value that a request can be classified against. Label pulumi.StringPtrInput // The workload classifier member name used to classified against. MemberName pulumi.StringPtrInput // The name which should be used for this Synapse SQL Pool Workload Classifier. Changing this forces a new Synapse SQL Pool Workload Classifier to be created. Name pulumi.StringPtrInput // The workload classifier start time for classification. It's of the `HH:MM` format in UTC time zone. StartTime pulumi.StringPtrInput // The ID of the Synapse SQL Pool Workload Group. Changing this forces a new Synapse SQL Pool Workload Classifier to be created. WorkloadGroupId pulumi.StringPtrInput } func (SqlPoolWorkloadClassifierState) ElementType() reflect.Type { return reflect.TypeOf((*sqlPoolWorkloadClassifierState)(nil)).Elem() } type sqlPoolWorkloadClassifierArgs struct { // Specifies the session context value that a request can be classified against. Context *string `pulumi:"context"` // The workload classifier end time for classification. It's of the `HH:MM` format in UTC time zone. EndTime *string `pulumi:"endTime"` // The workload classifier importance. The allowed values are `low`, `belowNormal`, `normal`, `aboveNormal` and `high`. Importance *string `pulumi:"importance"` // Specifies the label value that a request can be classified against. Label *string `pulumi:"label"` // The workload classifier member name used to classified against. MemberName string `pulumi:"memberName"` // The name which should be used for this Synapse SQL Pool Workload Classifier. Changing this forces a new Synapse SQL Pool Workload Classifier to be created. Name *string `pulumi:"name"` // The workload classifier start time for classification. It's of the `HH:MM` format in UTC time zone. StartTime *string `pulumi:"startTime"` // The ID of the Synapse SQL Pool Workload Group. Changing this forces a new Synapse SQL Pool Workload Classifier to be created. WorkloadGroupId string `pulumi:"workloadGroupId"` } // The set of arguments for constructing a SqlPoolWorkloadClassifier resource. type SqlPoolWorkloadClassifierArgs struct { // Specifies the session context value that a request can be classified against. Context pulumi.StringPtrInput // The workload classifier end time for classification. It's of the `HH:MM` format in UTC time zone. EndTime pulumi.StringPtrInput // The workload classifier importance. The allowed values are `low`, `belowNormal`, `normal`, `aboveNormal` and `high`. Importance pulumi.StringPtrInput // Specifies the label value that a request can be classified against. Label pulumi.StringPtrInput // The workload classifier member name used to classified against. MemberName pulumi.StringInput // The name which should be used for this Synapse SQL Pool Workload Classifier. Changing this forces a new Synapse SQL Pool Workload Classifier to be created. Name pulumi.StringPtrInput // The workload classifier start time for classification. It's of the `HH:MM` format in UTC time zone. StartTime pulumi.StringPtrInput // The ID of the Synapse SQL Pool Workload Group. Changing this forces a new Synapse SQL Pool Workload Classifier to be created. WorkloadGroupId pulumi.StringInput } func (SqlPoolWorkloadClassifierArgs) ElementType() reflect.Type { return reflect.TypeOf((*sqlPoolWorkloadClassifierArgs)(nil)).Elem() } type SqlPoolWorkloadClassifierInput interface { pulumi.Input ToSqlPoolWorkloadClassifierOutput() SqlPoolWorkloadClassifierOutput ToSqlPoolWorkloadClassifierOutputWithContext(ctx context.Context) SqlPoolWorkloadClassifierOutput } func (*SqlPoolWorkloadClassifier) ElementType() reflect.Type { return reflect.TypeOf((**SqlPoolWorkloadClassifier)(nil)).Elem() } func (i *SqlPoolWorkloadClassifier) ToSqlPoolWorkloadClassifierOutput() SqlPoolWorkloadClassifierOutput { return i.ToSqlPoolWorkloadClassifierOutputWithContext(context.Background()) } func (i *SqlPoolWorkloadClassifier) ToSqlPoolWorkloadClassifierOutputWithContext(ctx context.Context) SqlPoolWorkloadClassifierOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolWorkloadClassifierOutput) } // SqlPoolWorkloadClassifierArrayInput is an input type that accepts SqlPoolWorkloadClassifierArray and SqlPoolWorkloadClassifierArrayOutput values. // You can construct a concrete instance of `SqlPoolWorkloadClassifierArrayInput` via: // // SqlPoolWorkloadClassifierArray{ SqlPoolWorkloadClassifierArgs{...} } type SqlPoolWorkloadClassifierArrayInput interface { pulumi.Input ToSqlPoolWorkloadClassifierArrayOutput() SqlPoolWorkloadClassifierArrayOutput ToSqlPoolWorkloadClassifierArrayOutputWithContext(context.Context) SqlPoolWorkloadClassifierArrayOutput } type SqlPoolWorkloadClassifierArray []SqlPoolWorkloadClassifierInput func (SqlPoolWorkloadClassifierArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SqlPoolWorkloadClassifier)(nil)).Elem() } func (i SqlPoolWorkloadClassifierArray) ToSqlPoolWorkloadClassifierArrayOutput() SqlPoolWorkloadClassifierArrayOutput { return i.ToSqlPoolWorkloadClassifierArrayOutputWithContext(context.Background()) } func (i SqlPoolWorkloadClassifierArray) ToSqlPoolWorkloadClassifierArrayOutputWithContext(ctx context.Context) SqlPoolWorkloadClassifierArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolWorkloadClassifierArrayOutput) } // SqlPoolWorkloadClassifierMapInput is an input type that accepts SqlPoolWorkloadClassifierMap and SqlPoolWorkloadClassifierMapOutput values. // You can construct a concrete instance of `SqlPoolWorkloadClassifierMapInput` via: // // SqlPoolWorkloadClassifierMap{ "key": SqlPoolWorkloadClassifierArgs{...} } type SqlPoolWorkloadClassifierMapInput interface { pulumi.Input ToSqlPoolWorkloadClassifierMapOutput() SqlPoolWorkloadClassifierMapOutput ToSqlPoolWorkloadClassifierMapOutputWithContext(context.Context) SqlPoolWorkloadClassifierMapOutput } type SqlPoolWorkloadClassifierMap map[string]SqlPoolWorkloadClassifierInput func (SqlPoolWorkloadClassifierMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SqlPoolWorkloadClassifier)(nil)).Elem() } func (i SqlPoolWorkloadClassifierMap) ToSqlPoolWorkloadClassifierMapOutput() SqlPoolWorkloadClassifierMapOutput { return i.ToSqlPoolWorkloadClassifierMapOutputWithContext(context.Background()) } func (i SqlPoolWorkloadClassifierMap) ToSqlPoolWorkloadClassifierMapOutputWithContext(ctx context.Context) SqlPoolWorkloadClassifierMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolWorkloadClassifierMapOutput) } type SqlPoolWorkloadClassifierOutput struct{ *pulumi.OutputState } func (SqlPoolWorkloadClassifierOutput) ElementType() reflect.Type { return reflect.TypeOf((**SqlPoolWorkloadClassifier)(nil)).Elem() } func (o SqlPoolWorkloadClassifierOutput) ToSqlPoolWorkloadClassifierOutput() SqlPoolWorkloadClassifierOutput { return o } func (o SqlPoolWorkloadClassifierOutput) ToSqlPoolWorkloadClassifierOutputWithContext(ctx context.Context) SqlPoolWorkloadClassifierOutput { return o } // Specifies the session context value that a request can be classified against. func (o SqlPoolWorkloadClassifierOutput) Context() pulumi.StringPtrOutput { return o.ApplyT(func(v *SqlPoolWorkloadClassifier) pulumi.StringPtrOutput { return v.Context }).(pulumi.StringPtrOutput) } // The workload classifier end time for classification. It's of the `HH:MM` format in UTC time zone. func (o SqlPoolWorkloadClassifierOutput) EndTime() pulumi.StringPtrOutput { return o.ApplyT(func(v *SqlPoolWorkloadClassifier) pulumi.StringPtrOutput { return v.EndTime }).(pulumi.StringPtrOutput) } // The workload classifier importance. The allowed values are `low`, `belowNormal`, `normal`, `aboveNormal` and `high`. func (o SqlPoolWorkloadClassifierOutput) Importance() pulumi.StringPtrOutput { return o.ApplyT(func(v *SqlPoolWorkloadClassifier) pulumi.StringPtrOutput { return v.Importance }).(pulumi.StringPtrOutput) } // Specifies the label value that a request can be classified against. func (o SqlPoolWorkloadClassifierOutput) Label() pulumi.StringPtrOutput { return o.ApplyT(func(v *SqlPoolWorkloadClassifier) pulumi.StringPtrOutput { return v.Label }).(pulumi.StringPtrOutput) } // The workload classifier member name used to classified against. func (o SqlPoolWorkloadClassifierOutput) MemberName() pulumi.StringOutput { return o.ApplyT(func(v *SqlPoolWorkloadClassifier) pulumi.StringOutput { return v.MemberName }).(pulumi.StringOutput) } // The name which should be used for this Synapse SQL Pool Workload Classifier. Changing this forces a new Synapse SQL Pool Workload Classifier to be created. func (o SqlPoolWorkloadClassifierOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SqlPoolWorkloadClassifier) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The workload classifier start time for classification. It's of the `HH:MM` format in UTC time zone. func (o SqlPoolWorkloadClassifierOutput) StartTime() pulumi.StringPtrOutput { return o.ApplyT(func(v *SqlPoolWorkloadClassifier) pulumi.StringPtrOutput { return v.StartTime }).(pulumi.StringPtrOutput) } // The ID of the Synapse SQL Pool Workload Group. Changing this forces a new Synapse SQL Pool Workload Classifier to be created. func (o SqlPoolWorkloadClassifierOutput) WorkloadGroupId() pulumi.StringOutput { return o.ApplyT(func(v *SqlPoolWorkloadClassifier) pulumi.StringOutput { return v.WorkloadGroupId }).(pulumi.StringOutput) } type SqlPoolWorkloadClassifierArrayOutput struct{ *pulumi.OutputState } func (SqlPoolWorkloadClassifierArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SqlPoolWorkloadClassifier)(nil)).Elem() } func (o SqlPoolWorkloadClassifierArrayOutput) ToSqlPoolWorkloadClassifierArrayOutput() SqlPoolWorkloadClassifierArrayOutput { return o } func (o SqlPoolWorkloadClassifierArrayOutput) ToSqlPoolWorkloadClassifierArrayOutputWithContext(ctx context.Context) SqlPoolWorkloadClassifierArrayOutput { return o } func (o SqlPoolWorkloadClassifierArrayOutput) Index(i pulumi.IntInput) SqlPoolWorkloadClassifierOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SqlPoolWorkloadClassifier { return vs[0].([]*SqlPoolWorkloadClassifier)[vs[1].(int)] }).(SqlPoolWorkloadClassifierOutput) } type SqlPoolWorkloadClassifierMapOutput struct{ *pulumi.OutputState } func (SqlPoolWorkloadClassifierMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SqlPoolWorkloadClassifier)(nil)).Elem() } func (o SqlPoolWorkloadClassifierMapOutput) ToSqlPoolWorkloadClassifierMapOutput() SqlPoolWorkloadClassifierMapOutput { return o } func (o SqlPoolWorkloadClassifierMapOutput) ToSqlPoolWorkloadClassifierMapOutputWithContext(ctx context.Context) SqlPoolWorkloadClassifierMapOutput { return o } func (o SqlPoolWorkloadClassifierMapOutput) MapIndex(k pulumi.StringInput) SqlPoolWorkloadClassifierOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SqlPoolWorkloadClassifier { return vs[0].(map[string]*SqlPoolWorkloadClassifier)[vs[1].(string)] }).(SqlPoolWorkloadClassifierOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolWorkloadClassifierInput)(nil)).Elem(), &SqlPoolWorkloadClassifier{}) pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolWorkloadClassifierArrayInput)(nil)).Elem(), SqlPoolWorkloadClassifierArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolWorkloadClassifierMapInput)(nil)).Elem(), SqlPoolWorkloadClassifierMap{}) pulumi.RegisterOutputType(SqlPoolWorkloadClassifierOutput{}) pulumi.RegisterOutputType(SqlPoolWorkloadClassifierArrayOutput{}) pulumi.RegisterOutputType(SqlPoolWorkloadClassifierMapOutput{}) }
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/synapse/workspaceVulnerabilityAssessment.go
sdk/go/azure/synapse/workspaceVulnerabilityAssessment.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages the Vulnerability Assessment for a Synapse Workspace. // // ## 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("StorageV2"), // IsHnsEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{ // Name: pulumi.String("example"), // StorageAccountName: exampleAccount.Name, // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // AadAdmin: []map[string]interface{}{ // map[string]interface{}{ // "login": "AzureAD Admin", // "objectId": "00000000-0000-0000-0000-000000000000", // "tenantId": "00000000-0000-0000-0000-000000000000", // }, // }, // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // Tags: pulumi.StringMap{ // "Env": pulumi.String("production"), // }, // }) // if err != nil { // return err // } // auditLogs, err := storage.NewAccount(ctx, "audit_logs", &storage.AccountArgs{ // Name: pulumi.String("examplesa"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleWorkspaceSecurityAlertPolicy, err := synapse.NewWorkspaceSecurityAlertPolicy(ctx, "example", &synapse.WorkspaceSecurityAlertPolicyArgs{ // SynapseWorkspaceId: exampleWorkspace.ID(), // PolicyState: pulumi.String("Enabled"), // StorageEndpoint: auditLogs.PrimaryBlobEndpoint, // StorageAccountAccessKey: auditLogs.PrimaryAccessKey, // DisabledAlerts: pulumi.StringArray{ // pulumi.String("Sql_Injection"), // pulumi.String("Data_Exfiltration"), // }, // RetentionDays: pulumi.Int(20), // }) // if err != nil { // return err // } // _, err = synapse.NewWorkspaceVulnerabilityAssessment(ctx, "example", &synapse.WorkspaceVulnerabilityAssessmentArgs{ // WorkspaceSecurityAlertPolicyId: exampleWorkspaceSecurityAlertPolicy.ID(), // StorageContainerPath: pulumi.All(exampleAccount.PrimaryBlobEndpoint, exampleContainer.Name).ApplyT(func(_args []interface{}) (string, error) { // primaryBlobEndpoint := _args[0].(string) // name := _args[1].(string) // return fmt.Sprintf("%v%v/", primaryBlobEndpoint, name), nil // }).(pulumi.StringOutput), // StorageAccountAccessKey: exampleAccount.PrimaryAccessKey, // RecurringScans: &synapse.WorkspaceVulnerabilityAssessmentRecurringScansArgs{ // Enabled: pulumi.Bool(true), // Emails: pulumi.StringArray{ // pulumi.String("email@example1.com"), // pulumi.String("email@example2.com"), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse Workspace Vulnerability Assessment can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/workspaceVulnerabilityAssessment:WorkspaceVulnerabilityAssessment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Synapse/workspaces/workspace1/vulnerabilityAssessments/default // ``` type WorkspaceVulnerabilityAssessment struct { pulumi.CustomResourceState // The recurring scans settings. The `recurringScans` block supports fields documented below. RecurringScans WorkspaceVulnerabilityAssessmentRecurringScansOutput `pulumi:"recurringScans"` // Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required. StorageAccountAccessKey pulumi.StringPtrOutput `pulumi:"storageAccountAccessKey"` // A blob storage container path to hold the scan results (e.g. <https://example.blob.core.windows.net/VaScans/>). StorageContainerPath pulumi.StringOutput `pulumi:"storageContainerPath"` // A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required. StorageContainerSasKey pulumi.StringPtrOutput `pulumi:"storageContainerSasKey"` // The ID of the security alert policy of the Synapse Workspace. Changing this forces a new resource to be created. WorkspaceSecurityAlertPolicyId pulumi.StringOutput `pulumi:"workspaceSecurityAlertPolicyId"` } // NewWorkspaceVulnerabilityAssessment registers a new resource with the given unique name, arguments, and options. func NewWorkspaceVulnerabilityAssessment(ctx *pulumi.Context, name string, args *WorkspaceVulnerabilityAssessmentArgs, opts ...pulumi.ResourceOption) (*WorkspaceVulnerabilityAssessment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.StorageContainerPath == nil { return nil, errors.New("invalid value for required argument 'StorageContainerPath'") } if args.WorkspaceSecurityAlertPolicyId == nil { return nil, errors.New("invalid value for required argument 'WorkspaceSecurityAlertPolicyId'") } if args.StorageAccountAccessKey != nil { args.StorageAccountAccessKey = pulumi.ToSecret(args.StorageAccountAccessKey).(pulumi.StringPtrInput) } if args.StorageContainerSasKey != nil { args.StorageContainerSasKey = pulumi.ToSecret(args.StorageContainerSasKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "storageAccountAccessKey", "storageContainerSasKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource WorkspaceVulnerabilityAssessment err := ctx.RegisterResource("azure:synapse/workspaceVulnerabilityAssessment:WorkspaceVulnerabilityAssessment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWorkspaceVulnerabilityAssessment gets an existing WorkspaceVulnerabilityAssessment 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 GetWorkspaceVulnerabilityAssessment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WorkspaceVulnerabilityAssessmentState, opts ...pulumi.ResourceOption) (*WorkspaceVulnerabilityAssessment, error) { var resource WorkspaceVulnerabilityAssessment err := ctx.ReadResource("azure:synapse/workspaceVulnerabilityAssessment:WorkspaceVulnerabilityAssessment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering WorkspaceVulnerabilityAssessment resources. type workspaceVulnerabilityAssessmentState struct { // The recurring scans settings. The `recurringScans` block supports fields documented below. RecurringScans *WorkspaceVulnerabilityAssessmentRecurringScans `pulumi:"recurringScans"` // Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required. StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"` // A blob storage container path to hold the scan results (e.g. <https://example.blob.core.windows.net/VaScans/>). StorageContainerPath *string `pulumi:"storageContainerPath"` // A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required. StorageContainerSasKey *string `pulumi:"storageContainerSasKey"` // The ID of the security alert policy of the Synapse Workspace. Changing this forces a new resource to be created. WorkspaceSecurityAlertPolicyId *string `pulumi:"workspaceSecurityAlertPolicyId"` } type WorkspaceVulnerabilityAssessmentState struct { // The recurring scans settings. The `recurringScans` block supports fields documented below. RecurringScans WorkspaceVulnerabilityAssessmentRecurringScansPtrInput // Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required. StorageAccountAccessKey pulumi.StringPtrInput // A blob storage container path to hold the scan results (e.g. <https://example.blob.core.windows.net/VaScans/>). StorageContainerPath pulumi.StringPtrInput // A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required. StorageContainerSasKey pulumi.StringPtrInput // The ID of the security alert policy of the Synapse Workspace. Changing this forces a new resource to be created. WorkspaceSecurityAlertPolicyId pulumi.StringPtrInput } func (WorkspaceVulnerabilityAssessmentState) ElementType() reflect.Type { return reflect.TypeOf((*workspaceVulnerabilityAssessmentState)(nil)).Elem() } type workspaceVulnerabilityAssessmentArgs struct { // The recurring scans settings. The `recurringScans` block supports fields documented below. RecurringScans *WorkspaceVulnerabilityAssessmentRecurringScans `pulumi:"recurringScans"` // Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required. StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"` // A blob storage container path to hold the scan results (e.g. <https://example.blob.core.windows.net/VaScans/>). StorageContainerPath string `pulumi:"storageContainerPath"` // A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required. StorageContainerSasKey *string `pulumi:"storageContainerSasKey"` // The ID of the security alert policy of the Synapse Workspace. Changing this forces a new resource to be created. WorkspaceSecurityAlertPolicyId string `pulumi:"workspaceSecurityAlertPolicyId"` } // The set of arguments for constructing a WorkspaceVulnerabilityAssessment resource. type WorkspaceVulnerabilityAssessmentArgs struct { // The recurring scans settings. The `recurringScans` block supports fields documented below. RecurringScans WorkspaceVulnerabilityAssessmentRecurringScansPtrInput // Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required. StorageAccountAccessKey pulumi.StringPtrInput // A blob storage container path to hold the scan results (e.g. <https://example.blob.core.windows.net/VaScans/>). StorageContainerPath pulumi.StringInput // A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required. StorageContainerSasKey pulumi.StringPtrInput // The ID of the security alert policy of the Synapse Workspace. Changing this forces a new resource to be created. WorkspaceSecurityAlertPolicyId pulumi.StringInput } func (WorkspaceVulnerabilityAssessmentArgs) ElementType() reflect.Type { return reflect.TypeOf((*workspaceVulnerabilityAssessmentArgs)(nil)).Elem() } type WorkspaceVulnerabilityAssessmentInput interface { pulumi.Input ToWorkspaceVulnerabilityAssessmentOutput() WorkspaceVulnerabilityAssessmentOutput ToWorkspaceVulnerabilityAssessmentOutputWithContext(ctx context.Context) WorkspaceVulnerabilityAssessmentOutput } func (*WorkspaceVulnerabilityAssessment) ElementType() reflect.Type { return reflect.TypeOf((**WorkspaceVulnerabilityAssessment)(nil)).Elem() } func (i *WorkspaceVulnerabilityAssessment) ToWorkspaceVulnerabilityAssessmentOutput() WorkspaceVulnerabilityAssessmentOutput { return i.ToWorkspaceVulnerabilityAssessmentOutputWithContext(context.Background()) } func (i *WorkspaceVulnerabilityAssessment) ToWorkspaceVulnerabilityAssessmentOutputWithContext(ctx context.Context) WorkspaceVulnerabilityAssessmentOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceVulnerabilityAssessmentOutput) } // WorkspaceVulnerabilityAssessmentArrayInput is an input type that accepts WorkspaceVulnerabilityAssessmentArray and WorkspaceVulnerabilityAssessmentArrayOutput values. // You can construct a concrete instance of `WorkspaceVulnerabilityAssessmentArrayInput` via: // // WorkspaceVulnerabilityAssessmentArray{ WorkspaceVulnerabilityAssessmentArgs{...} } type WorkspaceVulnerabilityAssessmentArrayInput interface { pulumi.Input ToWorkspaceVulnerabilityAssessmentArrayOutput() WorkspaceVulnerabilityAssessmentArrayOutput ToWorkspaceVulnerabilityAssessmentArrayOutputWithContext(context.Context) WorkspaceVulnerabilityAssessmentArrayOutput } type WorkspaceVulnerabilityAssessmentArray []WorkspaceVulnerabilityAssessmentInput func (WorkspaceVulnerabilityAssessmentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*WorkspaceVulnerabilityAssessment)(nil)).Elem() } func (i WorkspaceVulnerabilityAssessmentArray) ToWorkspaceVulnerabilityAssessmentArrayOutput() WorkspaceVulnerabilityAssessmentArrayOutput { return i.ToWorkspaceVulnerabilityAssessmentArrayOutputWithContext(context.Background()) } func (i WorkspaceVulnerabilityAssessmentArray) ToWorkspaceVulnerabilityAssessmentArrayOutputWithContext(ctx context.Context) WorkspaceVulnerabilityAssessmentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceVulnerabilityAssessmentArrayOutput) } // WorkspaceVulnerabilityAssessmentMapInput is an input type that accepts WorkspaceVulnerabilityAssessmentMap and WorkspaceVulnerabilityAssessmentMapOutput values. // You can construct a concrete instance of `WorkspaceVulnerabilityAssessmentMapInput` via: // // WorkspaceVulnerabilityAssessmentMap{ "key": WorkspaceVulnerabilityAssessmentArgs{...} } type WorkspaceVulnerabilityAssessmentMapInput interface { pulumi.Input ToWorkspaceVulnerabilityAssessmentMapOutput() WorkspaceVulnerabilityAssessmentMapOutput ToWorkspaceVulnerabilityAssessmentMapOutputWithContext(context.Context) WorkspaceVulnerabilityAssessmentMapOutput } type WorkspaceVulnerabilityAssessmentMap map[string]WorkspaceVulnerabilityAssessmentInput func (WorkspaceVulnerabilityAssessmentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WorkspaceVulnerabilityAssessment)(nil)).Elem() } func (i WorkspaceVulnerabilityAssessmentMap) ToWorkspaceVulnerabilityAssessmentMapOutput() WorkspaceVulnerabilityAssessmentMapOutput { return i.ToWorkspaceVulnerabilityAssessmentMapOutputWithContext(context.Background()) } func (i WorkspaceVulnerabilityAssessmentMap) ToWorkspaceVulnerabilityAssessmentMapOutputWithContext(ctx context.Context) WorkspaceVulnerabilityAssessmentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceVulnerabilityAssessmentMapOutput) } type WorkspaceVulnerabilityAssessmentOutput struct{ *pulumi.OutputState } func (WorkspaceVulnerabilityAssessmentOutput) ElementType() reflect.Type { return reflect.TypeOf((**WorkspaceVulnerabilityAssessment)(nil)).Elem() } func (o WorkspaceVulnerabilityAssessmentOutput) ToWorkspaceVulnerabilityAssessmentOutput() WorkspaceVulnerabilityAssessmentOutput { return o } func (o WorkspaceVulnerabilityAssessmentOutput) ToWorkspaceVulnerabilityAssessmentOutputWithContext(ctx context.Context) WorkspaceVulnerabilityAssessmentOutput { return o } // The recurring scans settings. The `recurringScans` block supports fields documented below. func (o WorkspaceVulnerabilityAssessmentOutput) RecurringScans() WorkspaceVulnerabilityAssessmentRecurringScansOutput { return o.ApplyT(func(v *WorkspaceVulnerabilityAssessment) WorkspaceVulnerabilityAssessmentRecurringScansOutput { return v.RecurringScans }).(WorkspaceVulnerabilityAssessmentRecurringScansOutput) } // Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required. func (o WorkspaceVulnerabilityAssessmentOutput) StorageAccountAccessKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkspaceVulnerabilityAssessment) pulumi.StringPtrOutput { return v.StorageAccountAccessKey }).(pulumi.StringPtrOutput) } // A blob storage container path to hold the scan results (e.g. <https://example.blob.core.windows.net/VaScans/>). func (o WorkspaceVulnerabilityAssessmentOutput) StorageContainerPath() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceVulnerabilityAssessment) pulumi.StringOutput { return v.StorageContainerPath }).(pulumi.StringOutput) } // A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required. func (o WorkspaceVulnerabilityAssessmentOutput) StorageContainerSasKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkspaceVulnerabilityAssessment) pulumi.StringPtrOutput { return v.StorageContainerSasKey }).(pulumi.StringPtrOutput) } // The ID of the security alert policy of the Synapse Workspace. Changing this forces a new resource to be created. func (o WorkspaceVulnerabilityAssessmentOutput) WorkspaceSecurityAlertPolicyId() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceVulnerabilityAssessment) pulumi.StringOutput { return v.WorkspaceSecurityAlertPolicyId }).(pulumi.StringOutput) } type WorkspaceVulnerabilityAssessmentArrayOutput struct{ *pulumi.OutputState } func (WorkspaceVulnerabilityAssessmentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*WorkspaceVulnerabilityAssessment)(nil)).Elem() } func (o WorkspaceVulnerabilityAssessmentArrayOutput) ToWorkspaceVulnerabilityAssessmentArrayOutput() WorkspaceVulnerabilityAssessmentArrayOutput { return o } func (o WorkspaceVulnerabilityAssessmentArrayOutput) ToWorkspaceVulnerabilityAssessmentArrayOutputWithContext(ctx context.Context) WorkspaceVulnerabilityAssessmentArrayOutput { return o } func (o WorkspaceVulnerabilityAssessmentArrayOutput) Index(i pulumi.IntInput) WorkspaceVulnerabilityAssessmentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkspaceVulnerabilityAssessment { return vs[0].([]*WorkspaceVulnerabilityAssessment)[vs[1].(int)] }).(WorkspaceVulnerabilityAssessmentOutput) } type WorkspaceVulnerabilityAssessmentMapOutput struct{ *pulumi.OutputState } func (WorkspaceVulnerabilityAssessmentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WorkspaceVulnerabilityAssessment)(nil)).Elem() } func (o WorkspaceVulnerabilityAssessmentMapOutput) ToWorkspaceVulnerabilityAssessmentMapOutput() WorkspaceVulnerabilityAssessmentMapOutput { return o } func (o WorkspaceVulnerabilityAssessmentMapOutput) ToWorkspaceVulnerabilityAssessmentMapOutputWithContext(ctx context.Context) WorkspaceVulnerabilityAssessmentMapOutput { return o } func (o WorkspaceVulnerabilityAssessmentMapOutput) MapIndex(k pulumi.StringInput) WorkspaceVulnerabilityAssessmentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkspaceVulnerabilityAssessment { return vs[0].(map[string]*WorkspaceVulnerabilityAssessment)[vs[1].(string)] }).(WorkspaceVulnerabilityAssessmentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceVulnerabilityAssessmentInput)(nil)).Elem(), &WorkspaceVulnerabilityAssessment{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceVulnerabilityAssessmentArrayInput)(nil)).Elem(), WorkspaceVulnerabilityAssessmentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceVulnerabilityAssessmentMapInput)(nil)).Elem(), WorkspaceVulnerabilityAssessmentMap{}) pulumi.RegisterOutputType(WorkspaceVulnerabilityAssessmentOutput{}) pulumi.RegisterOutputType(WorkspaceVulnerabilityAssessmentArrayOutput{}) pulumi.RegisterOutputType(WorkspaceVulnerabilityAssessmentMapOutput{}) }
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/synapse/workspaceSqlAadAdmin.go
sdk/go/azure/synapse/workspaceSqlAadAdmin.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 synapse 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 Active Directory SQL Administrator setting for a Synapse 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/keyvault" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("StorageV2"), // IsHnsEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("example"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SkuName: pulumi.String("standard"), // PurgeProtectionEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // deployer, err := keyvault.NewAccessPolicy(ctx, "deployer", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Get"), // pulumi.String("Delete"), // pulumi.String("Purge"), // pulumi.String("GetRotationPolicy"), // }, // }) // if err != nil { // return err // } // _, err = keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{ // Name: pulumi.String("workspace-encryption-key"), // KeyVaultId: exampleKeyVault.ID(), // KeyType: pulumi.String("RSA"), // KeySize: pulumi.Int(2048), // KeyOpts: pulumi.StringArray{ // pulumi.String("unwrapKey"), // pulumi.String("wrapKey"), // }, // }, pulumi.DependsOn([]pulumi.Resource{ // deployer, // })) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // Tags: pulumi.StringMap{ // "Env": pulumi.String("production"), // }, // }) // if err != nil { // return err // } // _, err = synapse.NewWorkspaceSqlAadAdmin(ctx, "example", &synapse.WorkspaceSqlAadAdminArgs{ // SynapseWorkspaceId: exampleWorkspace.ID(), // Login: pulumi.String("AzureAD Admin"), // ObjectId: pulumi.String(current.ObjectId), // TenantId: pulumi.String(current.TenantId), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse Workspace Azure AD SQL Administrator can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/workspaceSqlAadAdmin:WorkspaceSqlAadAdmin example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/workspaces/workspace1/sqlAdministrators/activeDirectory // ``` type WorkspaceSqlAadAdmin struct { pulumi.CustomResourceState // The login name of the Azure AD SQL Administrator of this Synapse Workspace. Login pulumi.StringOutput `pulumi:"login"` // The object id of the Azure AD SQL Administrator of this Synapse Workspace. ObjectId pulumi.StringOutput `pulumi:"objectId"` // The ID of the Synapse Workspace where the Azure AD SQL Administrator should be configured. SynapseWorkspaceId pulumi.StringOutput `pulumi:"synapseWorkspaceId"` // The tenant id of the Azure AD SQL Administrator of this Synapse Workspace. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewWorkspaceSqlAadAdmin registers a new resource with the given unique name, arguments, and options. func NewWorkspaceSqlAadAdmin(ctx *pulumi.Context, name string, args *WorkspaceSqlAadAdminArgs, opts ...pulumi.ResourceOption) (*WorkspaceSqlAadAdmin, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Login == nil { return nil, errors.New("invalid value for required argument 'Login'") } if args.ObjectId == nil { return nil, errors.New("invalid value for required argument 'ObjectId'") } if args.SynapseWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'SynapseWorkspaceId'") } if args.TenantId == nil { return nil, errors.New("invalid value for required argument 'TenantId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource WorkspaceSqlAadAdmin err := ctx.RegisterResource("azure:synapse/workspaceSqlAadAdmin:WorkspaceSqlAadAdmin", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWorkspaceSqlAadAdmin gets an existing WorkspaceSqlAadAdmin 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 GetWorkspaceSqlAadAdmin(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WorkspaceSqlAadAdminState, opts ...pulumi.ResourceOption) (*WorkspaceSqlAadAdmin, error) { var resource WorkspaceSqlAadAdmin err := ctx.ReadResource("azure:synapse/workspaceSqlAadAdmin:WorkspaceSqlAadAdmin", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering WorkspaceSqlAadAdmin resources. type workspaceSqlAadAdminState struct { // The login name of the Azure AD SQL Administrator of this Synapse Workspace. Login *string `pulumi:"login"` // The object id of the Azure AD SQL Administrator of this Synapse Workspace. ObjectId *string `pulumi:"objectId"` // The ID of the Synapse Workspace where the Azure AD SQL Administrator should be configured. SynapseWorkspaceId *string `pulumi:"synapseWorkspaceId"` // The tenant id of the Azure AD SQL Administrator of this Synapse Workspace. TenantId *string `pulumi:"tenantId"` } type WorkspaceSqlAadAdminState struct { // The login name of the Azure AD SQL Administrator of this Synapse Workspace. Login pulumi.StringPtrInput // The object id of the Azure AD SQL Administrator of this Synapse Workspace. ObjectId pulumi.StringPtrInput // The ID of the Synapse Workspace where the Azure AD SQL Administrator should be configured. SynapseWorkspaceId pulumi.StringPtrInput // The tenant id of the Azure AD SQL Administrator of this Synapse Workspace. TenantId pulumi.StringPtrInput } func (WorkspaceSqlAadAdminState) ElementType() reflect.Type { return reflect.TypeOf((*workspaceSqlAadAdminState)(nil)).Elem() } type workspaceSqlAadAdminArgs struct { // The login name of the Azure AD SQL Administrator of this Synapse Workspace. Login string `pulumi:"login"` // The object id of the Azure AD SQL Administrator of this Synapse Workspace. ObjectId string `pulumi:"objectId"` // The ID of the Synapse Workspace where the Azure AD SQL Administrator should be configured. SynapseWorkspaceId string `pulumi:"synapseWorkspaceId"` // The tenant id of the Azure AD SQL Administrator of this Synapse Workspace. TenantId string `pulumi:"tenantId"` } // The set of arguments for constructing a WorkspaceSqlAadAdmin resource. type WorkspaceSqlAadAdminArgs struct { // The login name of the Azure AD SQL Administrator of this Synapse Workspace. Login pulumi.StringInput // The object id of the Azure AD SQL Administrator of this Synapse Workspace. ObjectId pulumi.StringInput // The ID of the Synapse Workspace where the Azure AD SQL Administrator should be configured. SynapseWorkspaceId pulumi.StringInput // The tenant id of the Azure AD SQL Administrator of this Synapse Workspace. TenantId pulumi.StringInput } func (WorkspaceSqlAadAdminArgs) ElementType() reflect.Type { return reflect.TypeOf((*workspaceSqlAadAdminArgs)(nil)).Elem() } type WorkspaceSqlAadAdminInput interface { pulumi.Input ToWorkspaceSqlAadAdminOutput() WorkspaceSqlAadAdminOutput ToWorkspaceSqlAadAdminOutputWithContext(ctx context.Context) WorkspaceSqlAadAdminOutput } func (*WorkspaceSqlAadAdmin) ElementType() reflect.Type { return reflect.TypeOf((**WorkspaceSqlAadAdmin)(nil)).Elem() } func (i *WorkspaceSqlAadAdmin) ToWorkspaceSqlAadAdminOutput() WorkspaceSqlAadAdminOutput { return i.ToWorkspaceSqlAadAdminOutputWithContext(context.Background()) } func (i *WorkspaceSqlAadAdmin) ToWorkspaceSqlAadAdminOutputWithContext(ctx context.Context) WorkspaceSqlAadAdminOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceSqlAadAdminOutput) } // WorkspaceSqlAadAdminArrayInput is an input type that accepts WorkspaceSqlAadAdminArray and WorkspaceSqlAadAdminArrayOutput values. // You can construct a concrete instance of `WorkspaceSqlAadAdminArrayInput` via: // // WorkspaceSqlAadAdminArray{ WorkspaceSqlAadAdminArgs{...} } type WorkspaceSqlAadAdminArrayInput interface { pulumi.Input ToWorkspaceSqlAadAdminArrayOutput() WorkspaceSqlAadAdminArrayOutput ToWorkspaceSqlAadAdminArrayOutputWithContext(context.Context) WorkspaceSqlAadAdminArrayOutput } type WorkspaceSqlAadAdminArray []WorkspaceSqlAadAdminInput func (WorkspaceSqlAadAdminArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*WorkspaceSqlAadAdmin)(nil)).Elem() } func (i WorkspaceSqlAadAdminArray) ToWorkspaceSqlAadAdminArrayOutput() WorkspaceSqlAadAdminArrayOutput { return i.ToWorkspaceSqlAadAdminArrayOutputWithContext(context.Background()) } func (i WorkspaceSqlAadAdminArray) ToWorkspaceSqlAadAdminArrayOutputWithContext(ctx context.Context) WorkspaceSqlAadAdminArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceSqlAadAdminArrayOutput) } // WorkspaceSqlAadAdminMapInput is an input type that accepts WorkspaceSqlAadAdminMap and WorkspaceSqlAadAdminMapOutput values. // You can construct a concrete instance of `WorkspaceSqlAadAdminMapInput` via: // // WorkspaceSqlAadAdminMap{ "key": WorkspaceSqlAadAdminArgs{...} } type WorkspaceSqlAadAdminMapInput interface { pulumi.Input ToWorkspaceSqlAadAdminMapOutput() WorkspaceSqlAadAdminMapOutput ToWorkspaceSqlAadAdminMapOutputWithContext(context.Context) WorkspaceSqlAadAdminMapOutput } type WorkspaceSqlAadAdminMap map[string]WorkspaceSqlAadAdminInput func (WorkspaceSqlAadAdminMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WorkspaceSqlAadAdmin)(nil)).Elem() } func (i WorkspaceSqlAadAdminMap) ToWorkspaceSqlAadAdminMapOutput() WorkspaceSqlAadAdminMapOutput { return i.ToWorkspaceSqlAadAdminMapOutputWithContext(context.Background()) } func (i WorkspaceSqlAadAdminMap) ToWorkspaceSqlAadAdminMapOutputWithContext(ctx context.Context) WorkspaceSqlAadAdminMapOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceSqlAadAdminMapOutput) } type WorkspaceSqlAadAdminOutput struct{ *pulumi.OutputState } func (WorkspaceSqlAadAdminOutput) ElementType() reflect.Type { return reflect.TypeOf((**WorkspaceSqlAadAdmin)(nil)).Elem() } func (o WorkspaceSqlAadAdminOutput) ToWorkspaceSqlAadAdminOutput() WorkspaceSqlAadAdminOutput { return o } func (o WorkspaceSqlAadAdminOutput) ToWorkspaceSqlAadAdminOutputWithContext(ctx context.Context) WorkspaceSqlAadAdminOutput { return o } // The login name of the Azure AD SQL Administrator of this Synapse Workspace. func (o WorkspaceSqlAadAdminOutput) Login() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceSqlAadAdmin) pulumi.StringOutput { return v.Login }).(pulumi.StringOutput) } // The object id of the Azure AD SQL Administrator of this Synapse Workspace. func (o WorkspaceSqlAadAdminOutput) ObjectId() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceSqlAadAdmin) pulumi.StringOutput { return v.ObjectId }).(pulumi.StringOutput) } // The ID of the Synapse Workspace where the Azure AD SQL Administrator should be configured. func (o WorkspaceSqlAadAdminOutput) SynapseWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceSqlAadAdmin) pulumi.StringOutput { return v.SynapseWorkspaceId }).(pulumi.StringOutput) } // The tenant id of the Azure AD SQL Administrator of this Synapse Workspace. func (o WorkspaceSqlAadAdminOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceSqlAadAdmin) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type WorkspaceSqlAadAdminArrayOutput struct{ *pulumi.OutputState } func (WorkspaceSqlAadAdminArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*WorkspaceSqlAadAdmin)(nil)).Elem() } func (o WorkspaceSqlAadAdminArrayOutput) ToWorkspaceSqlAadAdminArrayOutput() WorkspaceSqlAadAdminArrayOutput { return o } func (o WorkspaceSqlAadAdminArrayOutput) ToWorkspaceSqlAadAdminArrayOutputWithContext(ctx context.Context) WorkspaceSqlAadAdminArrayOutput { return o } func (o WorkspaceSqlAadAdminArrayOutput) Index(i pulumi.IntInput) WorkspaceSqlAadAdminOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkspaceSqlAadAdmin { return vs[0].([]*WorkspaceSqlAadAdmin)[vs[1].(int)] }).(WorkspaceSqlAadAdminOutput) } type WorkspaceSqlAadAdminMapOutput struct{ *pulumi.OutputState } func (WorkspaceSqlAadAdminMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WorkspaceSqlAadAdmin)(nil)).Elem() } func (o WorkspaceSqlAadAdminMapOutput) ToWorkspaceSqlAadAdminMapOutput() WorkspaceSqlAadAdminMapOutput { return o } func (o WorkspaceSqlAadAdminMapOutput) ToWorkspaceSqlAadAdminMapOutputWithContext(ctx context.Context) WorkspaceSqlAadAdminMapOutput { return o } func (o WorkspaceSqlAadAdminMapOutput) MapIndex(k pulumi.StringInput) WorkspaceSqlAadAdminOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkspaceSqlAadAdmin { return vs[0].(map[string]*WorkspaceSqlAadAdmin)[vs[1].(string)] }).(WorkspaceSqlAadAdminOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceSqlAadAdminInput)(nil)).Elem(), &WorkspaceSqlAadAdmin{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceSqlAadAdminArrayInput)(nil)).Elem(), WorkspaceSqlAadAdminArray{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceSqlAadAdminMapInput)(nil)).Elem(), WorkspaceSqlAadAdminMap{}) pulumi.RegisterOutputType(WorkspaceSqlAadAdminOutput{}) pulumi.RegisterOutputType(WorkspaceSqlAadAdminArrayOutput{}) pulumi.RegisterOutputType(WorkspaceSqlAadAdminMapOutput{}) }
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/synapse/sqlPoolSecurityAlertPolicy.go
sdk/go/azure/synapse/sqlPoolSecurityAlertPolicy.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Security Alert Policy for a Synapse SQL 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("StorageV2"), // IsHnsEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // AadAdmin: []map[string]interface{}{ // map[string]interface{}{ // "login": "AzureAD Admin", // "objectId": "00000000-0000-0000-0000-000000000000", // "tenantId": "00000000-0000-0000-0000-000000000000", // }, // }, // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // Tags: pulumi.StringMap{ // "Env": pulumi.String("production"), // }, // }) // if err != nil { // return err // } // exampleSqlPool, err := synapse.NewSqlPool(ctx, "example", &synapse.SqlPoolArgs{ // Name: pulumi.String("examplesqlpool"), // SynapseWorkspaceId: exampleWorkspace.ID(), // SkuName: pulumi.String("DW100c"), // CreateMode: pulumi.String("Default"), // }) // if err != nil { // return err // } // auditLogs, err := storage.NewAccount(ctx, "audit_logs", &storage.AccountArgs{ // Name: pulumi.String("examplesa"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // _, err = synapse.NewSqlPoolSecurityAlertPolicy(ctx, "example", &synapse.SqlPoolSecurityAlertPolicyArgs{ // SqlPoolId: exampleSqlPool.ID(), // PolicyState: pulumi.String("Enabled"), // StorageEndpoint: auditLogs.PrimaryBlobEndpoint, // StorageAccountAccessKey: auditLogs.PrimaryAccessKey, // DisabledAlerts: pulumi.StringArray{ // pulumi.String("Sql_Injection"), // pulumi.String("Data_Exfiltration"), // }, // RetentionDays: pulumi.Int(20), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse SQL Pool Security Alert Policies can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/sqlPoolSecurityAlertPolicy:SqlPoolSecurityAlertPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Synapse/workspaces/workspace1/sqlPools/sqlPool1/securityAlertPolicies/default // ``` type SqlPoolSecurityAlertPolicy struct { pulumi.CustomResourceState // Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`. DisabledAlerts pulumi.StringArrayOutput `pulumi:"disabledAlerts"` // Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`. EmailAccountAdminsEnabled pulumi.BoolPtrOutput `pulumi:"emailAccountAdminsEnabled"` // Specifies an array of email addresses to which the alert is sent. EmailAddresses pulumi.StringArrayOutput `pulumi:"emailAddresses"` // Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific SQL pool. Possible values are `Disabled`, `Enabled` and `New`. PolicyState pulumi.StringOutput `pulumi:"policyState"` // Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`. RetentionDays pulumi.IntPtrOutput `pulumi:"retentionDays"` // Specifies the ID of the Synapse SQL Pool. Changing this forces a new resource to be created. SqlPoolId pulumi.StringOutput `pulumi:"sqlPoolId"` // Specifies the identifier key of the Threat Detection audit storage account. StorageAccountAccessKey pulumi.StringPtrOutput `pulumi:"storageAccountAccessKey"` // Specifies the blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all Threat Detection audit logs. StorageEndpoint pulumi.StringPtrOutput `pulumi:"storageEndpoint"` } // NewSqlPoolSecurityAlertPolicy registers a new resource with the given unique name, arguments, and options. func NewSqlPoolSecurityAlertPolicy(ctx *pulumi.Context, name string, args *SqlPoolSecurityAlertPolicyArgs, opts ...pulumi.ResourceOption) (*SqlPoolSecurityAlertPolicy, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PolicyState == nil { return nil, errors.New("invalid value for required argument 'PolicyState'") } if args.SqlPoolId == nil { return nil, errors.New("invalid value for required argument 'SqlPoolId'") } if args.StorageAccountAccessKey != nil { args.StorageAccountAccessKey = pulumi.ToSecret(args.StorageAccountAccessKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "storageAccountAccessKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource SqlPoolSecurityAlertPolicy err := ctx.RegisterResource("azure:synapse/sqlPoolSecurityAlertPolicy:SqlPoolSecurityAlertPolicy", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSqlPoolSecurityAlertPolicy gets an existing SqlPoolSecurityAlertPolicy 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 GetSqlPoolSecurityAlertPolicy(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SqlPoolSecurityAlertPolicyState, opts ...pulumi.ResourceOption) (*SqlPoolSecurityAlertPolicy, error) { var resource SqlPoolSecurityAlertPolicy err := ctx.ReadResource("azure:synapse/sqlPoolSecurityAlertPolicy:SqlPoolSecurityAlertPolicy", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SqlPoolSecurityAlertPolicy resources. type sqlPoolSecurityAlertPolicyState struct { // Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`. DisabledAlerts []string `pulumi:"disabledAlerts"` // Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`. EmailAccountAdminsEnabled *bool `pulumi:"emailAccountAdminsEnabled"` // Specifies an array of email addresses to which the alert is sent. EmailAddresses []string `pulumi:"emailAddresses"` // Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific SQL pool. Possible values are `Disabled`, `Enabled` and `New`. PolicyState *string `pulumi:"policyState"` // Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`. RetentionDays *int `pulumi:"retentionDays"` // Specifies the ID of the Synapse SQL Pool. Changing this forces a new resource to be created. SqlPoolId *string `pulumi:"sqlPoolId"` // Specifies the identifier key of the Threat Detection audit storage account. StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"` // Specifies the blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all Threat Detection audit logs. StorageEndpoint *string `pulumi:"storageEndpoint"` } type SqlPoolSecurityAlertPolicyState struct { // Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`. DisabledAlerts pulumi.StringArrayInput // Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`. EmailAccountAdminsEnabled pulumi.BoolPtrInput // Specifies an array of email addresses to which the alert is sent. EmailAddresses pulumi.StringArrayInput // Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific SQL pool. Possible values are `Disabled`, `Enabled` and `New`. PolicyState pulumi.StringPtrInput // Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`. RetentionDays pulumi.IntPtrInput // Specifies the ID of the Synapse SQL Pool. Changing this forces a new resource to be created. SqlPoolId pulumi.StringPtrInput // Specifies the identifier key of the Threat Detection audit storage account. StorageAccountAccessKey pulumi.StringPtrInput // Specifies the blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all Threat Detection audit logs. StorageEndpoint pulumi.StringPtrInput } func (SqlPoolSecurityAlertPolicyState) ElementType() reflect.Type { return reflect.TypeOf((*sqlPoolSecurityAlertPolicyState)(nil)).Elem() } type sqlPoolSecurityAlertPolicyArgs struct { // Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`. DisabledAlerts []string `pulumi:"disabledAlerts"` // Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`. EmailAccountAdminsEnabled *bool `pulumi:"emailAccountAdminsEnabled"` // Specifies an array of email addresses to which the alert is sent. EmailAddresses []string `pulumi:"emailAddresses"` // Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific SQL pool. Possible values are `Disabled`, `Enabled` and `New`. PolicyState string `pulumi:"policyState"` // Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`. RetentionDays *int `pulumi:"retentionDays"` // Specifies the ID of the Synapse SQL Pool. Changing this forces a new resource to be created. SqlPoolId string `pulumi:"sqlPoolId"` // Specifies the identifier key of the Threat Detection audit storage account. StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"` // Specifies the blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all Threat Detection audit logs. StorageEndpoint *string `pulumi:"storageEndpoint"` } // The set of arguments for constructing a SqlPoolSecurityAlertPolicy resource. type SqlPoolSecurityAlertPolicyArgs struct { // Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`. DisabledAlerts pulumi.StringArrayInput // Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`. EmailAccountAdminsEnabled pulumi.BoolPtrInput // Specifies an array of email addresses to which the alert is sent. EmailAddresses pulumi.StringArrayInput // Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific SQL pool. Possible values are `Disabled`, `Enabled` and `New`. PolicyState pulumi.StringInput // Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`. RetentionDays pulumi.IntPtrInput // Specifies the ID of the Synapse SQL Pool. Changing this forces a new resource to be created. SqlPoolId pulumi.StringInput // Specifies the identifier key of the Threat Detection audit storage account. StorageAccountAccessKey pulumi.StringPtrInput // Specifies the blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all Threat Detection audit logs. StorageEndpoint pulumi.StringPtrInput } func (SqlPoolSecurityAlertPolicyArgs) ElementType() reflect.Type { return reflect.TypeOf((*sqlPoolSecurityAlertPolicyArgs)(nil)).Elem() } type SqlPoolSecurityAlertPolicyInput interface { pulumi.Input ToSqlPoolSecurityAlertPolicyOutput() SqlPoolSecurityAlertPolicyOutput ToSqlPoolSecurityAlertPolicyOutputWithContext(ctx context.Context) SqlPoolSecurityAlertPolicyOutput } func (*SqlPoolSecurityAlertPolicy) ElementType() reflect.Type { return reflect.TypeOf((**SqlPoolSecurityAlertPolicy)(nil)).Elem() } func (i *SqlPoolSecurityAlertPolicy) ToSqlPoolSecurityAlertPolicyOutput() SqlPoolSecurityAlertPolicyOutput { return i.ToSqlPoolSecurityAlertPolicyOutputWithContext(context.Background()) } func (i *SqlPoolSecurityAlertPolicy) ToSqlPoolSecurityAlertPolicyOutputWithContext(ctx context.Context) SqlPoolSecurityAlertPolicyOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolSecurityAlertPolicyOutput) } // SqlPoolSecurityAlertPolicyArrayInput is an input type that accepts SqlPoolSecurityAlertPolicyArray and SqlPoolSecurityAlertPolicyArrayOutput values. // You can construct a concrete instance of `SqlPoolSecurityAlertPolicyArrayInput` via: // // SqlPoolSecurityAlertPolicyArray{ SqlPoolSecurityAlertPolicyArgs{...} } type SqlPoolSecurityAlertPolicyArrayInput interface { pulumi.Input ToSqlPoolSecurityAlertPolicyArrayOutput() SqlPoolSecurityAlertPolicyArrayOutput ToSqlPoolSecurityAlertPolicyArrayOutputWithContext(context.Context) SqlPoolSecurityAlertPolicyArrayOutput } type SqlPoolSecurityAlertPolicyArray []SqlPoolSecurityAlertPolicyInput func (SqlPoolSecurityAlertPolicyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SqlPoolSecurityAlertPolicy)(nil)).Elem() } func (i SqlPoolSecurityAlertPolicyArray) ToSqlPoolSecurityAlertPolicyArrayOutput() SqlPoolSecurityAlertPolicyArrayOutput { return i.ToSqlPoolSecurityAlertPolicyArrayOutputWithContext(context.Background()) } func (i SqlPoolSecurityAlertPolicyArray) ToSqlPoolSecurityAlertPolicyArrayOutputWithContext(ctx context.Context) SqlPoolSecurityAlertPolicyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolSecurityAlertPolicyArrayOutput) } // SqlPoolSecurityAlertPolicyMapInput is an input type that accepts SqlPoolSecurityAlertPolicyMap and SqlPoolSecurityAlertPolicyMapOutput values. // You can construct a concrete instance of `SqlPoolSecurityAlertPolicyMapInput` via: // // SqlPoolSecurityAlertPolicyMap{ "key": SqlPoolSecurityAlertPolicyArgs{...} } type SqlPoolSecurityAlertPolicyMapInput interface { pulumi.Input ToSqlPoolSecurityAlertPolicyMapOutput() SqlPoolSecurityAlertPolicyMapOutput ToSqlPoolSecurityAlertPolicyMapOutputWithContext(context.Context) SqlPoolSecurityAlertPolicyMapOutput } type SqlPoolSecurityAlertPolicyMap map[string]SqlPoolSecurityAlertPolicyInput func (SqlPoolSecurityAlertPolicyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SqlPoolSecurityAlertPolicy)(nil)).Elem() } func (i SqlPoolSecurityAlertPolicyMap) ToSqlPoolSecurityAlertPolicyMapOutput() SqlPoolSecurityAlertPolicyMapOutput { return i.ToSqlPoolSecurityAlertPolicyMapOutputWithContext(context.Background()) } func (i SqlPoolSecurityAlertPolicyMap) ToSqlPoolSecurityAlertPolicyMapOutputWithContext(ctx context.Context) SqlPoolSecurityAlertPolicyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolSecurityAlertPolicyMapOutput) } type SqlPoolSecurityAlertPolicyOutput struct{ *pulumi.OutputState } func (SqlPoolSecurityAlertPolicyOutput) ElementType() reflect.Type { return reflect.TypeOf((**SqlPoolSecurityAlertPolicy)(nil)).Elem() } func (o SqlPoolSecurityAlertPolicyOutput) ToSqlPoolSecurityAlertPolicyOutput() SqlPoolSecurityAlertPolicyOutput { return o } func (o SqlPoolSecurityAlertPolicyOutput) ToSqlPoolSecurityAlertPolicyOutputWithContext(ctx context.Context) SqlPoolSecurityAlertPolicyOutput { return o } // Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`. func (o SqlPoolSecurityAlertPolicyOutput) DisabledAlerts() pulumi.StringArrayOutput { return o.ApplyT(func(v *SqlPoolSecurityAlertPolicy) pulumi.StringArrayOutput { return v.DisabledAlerts }).(pulumi.StringArrayOutput) } // Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`. func (o SqlPoolSecurityAlertPolicyOutput) EmailAccountAdminsEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *SqlPoolSecurityAlertPolicy) pulumi.BoolPtrOutput { return v.EmailAccountAdminsEnabled }).(pulumi.BoolPtrOutput) } // Specifies an array of email addresses to which the alert is sent. func (o SqlPoolSecurityAlertPolicyOutput) EmailAddresses() pulumi.StringArrayOutput { return o.ApplyT(func(v *SqlPoolSecurityAlertPolicy) pulumi.StringArrayOutput { return v.EmailAddresses }).(pulumi.StringArrayOutput) } // Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific SQL pool. Possible values are `Disabled`, `Enabled` and `New`. func (o SqlPoolSecurityAlertPolicyOutput) PolicyState() pulumi.StringOutput { return o.ApplyT(func(v *SqlPoolSecurityAlertPolicy) pulumi.StringOutput { return v.PolicyState }).(pulumi.StringOutput) } // Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`. func (o SqlPoolSecurityAlertPolicyOutput) RetentionDays() pulumi.IntPtrOutput { return o.ApplyT(func(v *SqlPoolSecurityAlertPolicy) pulumi.IntPtrOutput { return v.RetentionDays }).(pulumi.IntPtrOutput) } // Specifies the ID of the Synapse SQL Pool. Changing this forces a new resource to be created. func (o SqlPoolSecurityAlertPolicyOutput) SqlPoolId() pulumi.StringOutput { return o.ApplyT(func(v *SqlPoolSecurityAlertPolicy) pulumi.StringOutput { return v.SqlPoolId }).(pulumi.StringOutput) } // Specifies the identifier key of the Threat Detection audit storage account. func (o SqlPoolSecurityAlertPolicyOutput) StorageAccountAccessKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *SqlPoolSecurityAlertPolicy) pulumi.StringPtrOutput { return v.StorageAccountAccessKey }).(pulumi.StringPtrOutput) } // Specifies the blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all Threat Detection audit logs. func (o SqlPoolSecurityAlertPolicyOutput) StorageEndpoint() pulumi.StringPtrOutput { return o.ApplyT(func(v *SqlPoolSecurityAlertPolicy) pulumi.StringPtrOutput { return v.StorageEndpoint }).(pulumi.StringPtrOutput) } type SqlPoolSecurityAlertPolicyArrayOutput struct{ *pulumi.OutputState } func (SqlPoolSecurityAlertPolicyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SqlPoolSecurityAlertPolicy)(nil)).Elem() } func (o SqlPoolSecurityAlertPolicyArrayOutput) ToSqlPoolSecurityAlertPolicyArrayOutput() SqlPoolSecurityAlertPolicyArrayOutput { return o } func (o SqlPoolSecurityAlertPolicyArrayOutput) ToSqlPoolSecurityAlertPolicyArrayOutputWithContext(ctx context.Context) SqlPoolSecurityAlertPolicyArrayOutput { return o } func (o SqlPoolSecurityAlertPolicyArrayOutput) Index(i pulumi.IntInput) SqlPoolSecurityAlertPolicyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SqlPoolSecurityAlertPolicy { return vs[0].([]*SqlPoolSecurityAlertPolicy)[vs[1].(int)] }).(SqlPoolSecurityAlertPolicyOutput) } type SqlPoolSecurityAlertPolicyMapOutput struct{ *pulumi.OutputState } func (SqlPoolSecurityAlertPolicyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SqlPoolSecurityAlertPolicy)(nil)).Elem() } func (o SqlPoolSecurityAlertPolicyMapOutput) ToSqlPoolSecurityAlertPolicyMapOutput() SqlPoolSecurityAlertPolicyMapOutput { return o } func (o SqlPoolSecurityAlertPolicyMapOutput) ToSqlPoolSecurityAlertPolicyMapOutputWithContext(ctx context.Context) SqlPoolSecurityAlertPolicyMapOutput { return o } func (o SqlPoolSecurityAlertPolicyMapOutput) MapIndex(k pulumi.StringInput) SqlPoolSecurityAlertPolicyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SqlPoolSecurityAlertPolicy { return vs[0].(map[string]*SqlPoolSecurityAlertPolicy)[vs[1].(string)] }).(SqlPoolSecurityAlertPolicyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolSecurityAlertPolicyInput)(nil)).Elem(), &SqlPoolSecurityAlertPolicy{}) pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolSecurityAlertPolicyArrayInput)(nil)).Elem(), SqlPoolSecurityAlertPolicyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolSecurityAlertPolicyMapInput)(nil)).Elem(), SqlPoolSecurityAlertPolicyMap{}) pulumi.RegisterOutputType(SqlPoolSecurityAlertPolicyOutput{}) pulumi.RegisterOutputType(SqlPoolSecurityAlertPolicyArrayOutput{}) pulumi.RegisterOutputType(SqlPoolSecurityAlertPolicyMapOutput{}) }
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/synapse/sqlPoolWorkloadGroup.go
sdk/go/azure/synapse/sqlPoolWorkloadGroup.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Synapse SQL Pool Workload 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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"), // Location: pulumi.String("west europe"), // }) // if err != nil { // return err // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountKind: pulumi.String("BlobStorage"), // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // exampleSqlPool, err := synapse.NewSqlPool(ctx, "example", &synapse.SqlPoolArgs{ // Name: pulumi.String("example"), // SynapseWorkspaceId: exampleWorkspace.ID(), // SkuName: pulumi.String("DW100c"), // CreateMode: pulumi.String("Default"), // }) // if err != nil { // return err // } // _, err = synapse.NewSqlPoolWorkloadGroup(ctx, "example", &synapse.SqlPoolWorkloadGroupArgs{ // Name: pulumi.String("example"), // SqlPoolId: exampleSqlPool.ID(), // Importance: pulumi.String("normal"), // MaxResourcePercent: pulumi.Int(100), // MinResourcePercent: pulumi.Int(0), // MaxResourcePercentPerRequest: pulumi.Float64(3), // MinResourcePercentPerRequest: pulumi.Float64(3), // QueryExecutionTimeoutInSeconds: pulumi.Int(0), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse SQL Pool Workload Groups can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/sqlPoolWorkloadGroup:SqlPoolWorkloadGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Synapse/workspaces/workspace1/sqlPools/sqlPool1/workloadGroups/workloadGroup1 // ``` type SqlPoolWorkloadGroup struct { pulumi.CustomResourceState // The workload group importance level. Defaults to `normal`. Importance pulumi.StringPtrOutput `pulumi:"importance"` // The workload group cap percentage resource. MaxResourcePercent pulumi.IntOutput `pulumi:"maxResourcePercent"` // The workload group request maximum grant percentage. Defaults to `3`. MaxResourcePercentPerRequest pulumi.Float64PtrOutput `pulumi:"maxResourcePercentPerRequest"` // The workload group minimum percentage resource. MinResourcePercent pulumi.IntOutput `pulumi:"minResourcePercent"` // The workload group request minimum grant percentage. MinResourcePercentPerRequest pulumi.Float64PtrOutput `pulumi:"minResourcePercentPerRequest"` // The name which should be used for this Synapse SQL Pool Workload Group. Changing this forces a new Synapse SQL Pool Workload Group to be created. Name pulumi.StringOutput `pulumi:"name"` // The workload group query execution timeout. QueryExecutionTimeoutInSeconds pulumi.IntPtrOutput `pulumi:"queryExecutionTimeoutInSeconds"` // The ID of the Synapse SQL Pool. Changing this forces a new Synapse SQL Pool Workload Group to be created. SqlPoolId pulumi.StringOutput `pulumi:"sqlPoolId"` } // NewSqlPoolWorkloadGroup registers a new resource with the given unique name, arguments, and options. func NewSqlPoolWorkloadGroup(ctx *pulumi.Context, name string, args *SqlPoolWorkloadGroupArgs, opts ...pulumi.ResourceOption) (*SqlPoolWorkloadGroup, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.MaxResourcePercent == nil { return nil, errors.New("invalid value for required argument 'MaxResourcePercent'") } if args.MinResourcePercent == nil { return nil, errors.New("invalid value for required argument 'MinResourcePercent'") } if args.SqlPoolId == nil { return nil, errors.New("invalid value for required argument 'SqlPoolId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SqlPoolWorkloadGroup err := ctx.RegisterResource("azure:synapse/sqlPoolWorkloadGroup:SqlPoolWorkloadGroup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSqlPoolWorkloadGroup gets an existing SqlPoolWorkloadGroup 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 GetSqlPoolWorkloadGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SqlPoolWorkloadGroupState, opts ...pulumi.ResourceOption) (*SqlPoolWorkloadGroup, error) { var resource SqlPoolWorkloadGroup err := ctx.ReadResource("azure:synapse/sqlPoolWorkloadGroup:SqlPoolWorkloadGroup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SqlPoolWorkloadGroup resources. type sqlPoolWorkloadGroupState struct { // The workload group importance level. Defaults to `normal`. Importance *string `pulumi:"importance"` // The workload group cap percentage resource. MaxResourcePercent *int `pulumi:"maxResourcePercent"` // The workload group request maximum grant percentage. Defaults to `3`. MaxResourcePercentPerRequest *float64 `pulumi:"maxResourcePercentPerRequest"` // The workload group minimum percentage resource. MinResourcePercent *int `pulumi:"minResourcePercent"` // The workload group request minimum grant percentage. MinResourcePercentPerRequest *float64 `pulumi:"minResourcePercentPerRequest"` // The name which should be used for this Synapse SQL Pool Workload Group. Changing this forces a new Synapse SQL Pool Workload Group to be created. Name *string `pulumi:"name"` // The workload group query execution timeout. QueryExecutionTimeoutInSeconds *int `pulumi:"queryExecutionTimeoutInSeconds"` // The ID of the Synapse SQL Pool. Changing this forces a new Synapse SQL Pool Workload Group to be created. SqlPoolId *string `pulumi:"sqlPoolId"` } type SqlPoolWorkloadGroupState struct { // The workload group importance level. Defaults to `normal`. Importance pulumi.StringPtrInput // The workload group cap percentage resource. MaxResourcePercent pulumi.IntPtrInput // The workload group request maximum grant percentage. Defaults to `3`. MaxResourcePercentPerRequest pulumi.Float64PtrInput // The workload group minimum percentage resource. MinResourcePercent pulumi.IntPtrInput // The workload group request minimum grant percentage. MinResourcePercentPerRequest pulumi.Float64PtrInput // The name which should be used for this Synapse SQL Pool Workload Group. Changing this forces a new Synapse SQL Pool Workload Group to be created. Name pulumi.StringPtrInput // The workload group query execution timeout. QueryExecutionTimeoutInSeconds pulumi.IntPtrInput // The ID of the Synapse SQL Pool. Changing this forces a new Synapse SQL Pool Workload Group to be created. SqlPoolId pulumi.StringPtrInput } func (SqlPoolWorkloadGroupState) ElementType() reflect.Type { return reflect.TypeOf((*sqlPoolWorkloadGroupState)(nil)).Elem() } type sqlPoolWorkloadGroupArgs struct { // The workload group importance level. Defaults to `normal`. Importance *string `pulumi:"importance"` // The workload group cap percentage resource. MaxResourcePercent int `pulumi:"maxResourcePercent"` // The workload group request maximum grant percentage. Defaults to `3`. MaxResourcePercentPerRequest *float64 `pulumi:"maxResourcePercentPerRequest"` // The workload group minimum percentage resource. MinResourcePercent int `pulumi:"minResourcePercent"` // The workload group request minimum grant percentage. MinResourcePercentPerRequest *float64 `pulumi:"minResourcePercentPerRequest"` // The name which should be used for this Synapse SQL Pool Workload Group. Changing this forces a new Synapse SQL Pool Workload Group to be created. Name *string `pulumi:"name"` // The workload group query execution timeout. QueryExecutionTimeoutInSeconds *int `pulumi:"queryExecutionTimeoutInSeconds"` // The ID of the Synapse SQL Pool. Changing this forces a new Synapse SQL Pool Workload Group to be created. SqlPoolId string `pulumi:"sqlPoolId"` } // The set of arguments for constructing a SqlPoolWorkloadGroup resource. type SqlPoolWorkloadGroupArgs struct { // The workload group importance level. Defaults to `normal`. Importance pulumi.StringPtrInput // The workload group cap percentage resource. MaxResourcePercent pulumi.IntInput // The workload group request maximum grant percentage. Defaults to `3`. MaxResourcePercentPerRequest pulumi.Float64PtrInput // The workload group minimum percentage resource. MinResourcePercent pulumi.IntInput // The workload group request minimum grant percentage. MinResourcePercentPerRequest pulumi.Float64PtrInput // The name which should be used for this Synapse SQL Pool Workload Group. Changing this forces a new Synapse SQL Pool Workload Group to be created. Name pulumi.StringPtrInput // The workload group query execution timeout. QueryExecutionTimeoutInSeconds pulumi.IntPtrInput // The ID of the Synapse SQL Pool. Changing this forces a new Synapse SQL Pool Workload Group to be created. SqlPoolId pulumi.StringInput } func (SqlPoolWorkloadGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*sqlPoolWorkloadGroupArgs)(nil)).Elem() } type SqlPoolWorkloadGroupInput interface { pulumi.Input ToSqlPoolWorkloadGroupOutput() SqlPoolWorkloadGroupOutput ToSqlPoolWorkloadGroupOutputWithContext(ctx context.Context) SqlPoolWorkloadGroupOutput } func (*SqlPoolWorkloadGroup) ElementType() reflect.Type { return reflect.TypeOf((**SqlPoolWorkloadGroup)(nil)).Elem() } func (i *SqlPoolWorkloadGroup) ToSqlPoolWorkloadGroupOutput() SqlPoolWorkloadGroupOutput { return i.ToSqlPoolWorkloadGroupOutputWithContext(context.Background()) } func (i *SqlPoolWorkloadGroup) ToSqlPoolWorkloadGroupOutputWithContext(ctx context.Context) SqlPoolWorkloadGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolWorkloadGroupOutput) } // SqlPoolWorkloadGroupArrayInput is an input type that accepts SqlPoolWorkloadGroupArray and SqlPoolWorkloadGroupArrayOutput values. // You can construct a concrete instance of `SqlPoolWorkloadGroupArrayInput` via: // // SqlPoolWorkloadGroupArray{ SqlPoolWorkloadGroupArgs{...} } type SqlPoolWorkloadGroupArrayInput interface { pulumi.Input ToSqlPoolWorkloadGroupArrayOutput() SqlPoolWorkloadGroupArrayOutput ToSqlPoolWorkloadGroupArrayOutputWithContext(context.Context) SqlPoolWorkloadGroupArrayOutput } type SqlPoolWorkloadGroupArray []SqlPoolWorkloadGroupInput func (SqlPoolWorkloadGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SqlPoolWorkloadGroup)(nil)).Elem() } func (i SqlPoolWorkloadGroupArray) ToSqlPoolWorkloadGroupArrayOutput() SqlPoolWorkloadGroupArrayOutput { return i.ToSqlPoolWorkloadGroupArrayOutputWithContext(context.Background()) } func (i SqlPoolWorkloadGroupArray) ToSqlPoolWorkloadGroupArrayOutputWithContext(ctx context.Context) SqlPoolWorkloadGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolWorkloadGroupArrayOutput) } // SqlPoolWorkloadGroupMapInput is an input type that accepts SqlPoolWorkloadGroupMap and SqlPoolWorkloadGroupMapOutput values. // You can construct a concrete instance of `SqlPoolWorkloadGroupMapInput` via: // // SqlPoolWorkloadGroupMap{ "key": SqlPoolWorkloadGroupArgs{...} } type SqlPoolWorkloadGroupMapInput interface { pulumi.Input ToSqlPoolWorkloadGroupMapOutput() SqlPoolWorkloadGroupMapOutput ToSqlPoolWorkloadGroupMapOutputWithContext(context.Context) SqlPoolWorkloadGroupMapOutput } type SqlPoolWorkloadGroupMap map[string]SqlPoolWorkloadGroupInput func (SqlPoolWorkloadGroupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SqlPoolWorkloadGroup)(nil)).Elem() } func (i SqlPoolWorkloadGroupMap) ToSqlPoolWorkloadGroupMapOutput() SqlPoolWorkloadGroupMapOutput { return i.ToSqlPoolWorkloadGroupMapOutputWithContext(context.Background()) } func (i SqlPoolWorkloadGroupMap) ToSqlPoolWorkloadGroupMapOutputWithContext(ctx context.Context) SqlPoolWorkloadGroupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolWorkloadGroupMapOutput) } type SqlPoolWorkloadGroupOutput struct{ *pulumi.OutputState } func (SqlPoolWorkloadGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((**SqlPoolWorkloadGroup)(nil)).Elem() } func (o SqlPoolWorkloadGroupOutput) ToSqlPoolWorkloadGroupOutput() SqlPoolWorkloadGroupOutput { return o } func (o SqlPoolWorkloadGroupOutput) ToSqlPoolWorkloadGroupOutputWithContext(ctx context.Context) SqlPoolWorkloadGroupOutput { return o } // The workload group importance level. Defaults to `normal`. func (o SqlPoolWorkloadGroupOutput) Importance() pulumi.StringPtrOutput { return o.ApplyT(func(v *SqlPoolWorkloadGroup) pulumi.StringPtrOutput { return v.Importance }).(pulumi.StringPtrOutput) } // The workload group cap percentage resource. func (o SqlPoolWorkloadGroupOutput) MaxResourcePercent() pulumi.IntOutput { return o.ApplyT(func(v *SqlPoolWorkloadGroup) pulumi.IntOutput { return v.MaxResourcePercent }).(pulumi.IntOutput) } // The workload group request maximum grant percentage. Defaults to `3`. func (o SqlPoolWorkloadGroupOutput) MaxResourcePercentPerRequest() pulumi.Float64PtrOutput { return o.ApplyT(func(v *SqlPoolWorkloadGroup) pulumi.Float64PtrOutput { return v.MaxResourcePercentPerRequest }).(pulumi.Float64PtrOutput) } // The workload group minimum percentage resource. func (o SqlPoolWorkloadGroupOutput) MinResourcePercent() pulumi.IntOutput { return o.ApplyT(func(v *SqlPoolWorkloadGroup) pulumi.IntOutput { return v.MinResourcePercent }).(pulumi.IntOutput) } // The workload group request minimum grant percentage. func (o SqlPoolWorkloadGroupOutput) MinResourcePercentPerRequest() pulumi.Float64PtrOutput { return o.ApplyT(func(v *SqlPoolWorkloadGroup) pulumi.Float64PtrOutput { return v.MinResourcePercentPerRequest }).(pulumi.Float64PtrOutput) } // The name which should be used for this Synapse SQL Pool Workload Group. Changing this forces a new Synapse SQL Pool Workload Group to be created. func (o SqlPoolWorkloadGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SqlPoolWorkloadGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The workload group query execution timeout. func (o SqlPoolWorkloadGroupOutput) QueryExecutionTimeoutInSeconds() pulumi.IntPtrOutput { return o.ApplyT(func(v *SqlPoolWorkloadGroup) pulumi.IntPtrOutput { return v.QueryExecutionTimeoutInSeconds }).(pulumi.IntPtrOutput) } // The ID of the Synapse SQL Pool. Changing this forces a new Synapse SQL Pool Workload Group to be created. func (o SqlPoolWorkloadGroupOutput) SqlPoolId() pulumi.StringOutput { return o.ApplyT(func(v *SqlPoolWorkloadGroup) pulumi.StringOutput { return v.SqlPoolId }).(pulumi.StringOutput) } type SqlPoolWorkloadGroupArrayOutput struct{ *pulumi.OutputState } func (SqlPoolWorkloadGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SqlPoolWorkloadGroup)(nil)).Elem() } func (o SqlPoolWorkloadGroupArrayOutput) ToSqlPoolWorkloadGroupArrayOutput() SqlPoolWorkloadGroupArrayOutput { return o } func (o SqlPoolWorkloadGroupArrayOutput) ToSqlPoolWorkloadGroupArrayOutputWithContext(ctx context.Context) SqlPoolWorkloadGroupArrayOutput { return o } func (o SqlPoolWorkloadGroupArrayOutput) Index(i pulumi.IntInput) SqlPoolWorkloadGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SqlPoolWorkloadGroup { return vs[0].([]*SqlPoolWorkloadGroup)[vs[1].(int)] }).(SqlPoolWorkloadGroupOutput) } type SqlPoolWorkloadGroupMapOutput struct{ *pulumi.OutputState } func (SqlPoolWorkloadGroupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SqlPoolWorkloadGroup)(nil)).Elem() } func (o SqlPoolWorkloadGroupMapOutput) ToSqlPoolWorkloadGroupMapOutput() SqlPoolWorkloadGroupMapOutput { return o } func (o SqlPoolWorkloadGroupMapOutput) ToSqlPoolWorkloadGroupMapOutputWithContext(ctx context.Context) SqlPoolWorkloadGroupMapOutput { return o } func (o SqlPoolWorkloadGroupMapOutput) MapIndex(k pulumi.StringInput) SqlPoolWorkloadGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SqlPoolWorkloadGroup { return vs[0].(map[string]*SqlPoolWorkloadGroup)[vs[1].(string)] }).(SqlPoolWorkloadGroupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolWorkloadGroupInput)(nil)).Elem(), &SqlPoolWorkloadGroup{}) pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolWorkloadGroupArrayInput)(nil)).Elem(), SqlPoolWorkloadGroupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolWorkloadGroupMapInput)(nil)).Elem(), SqlPoolWorkloadGroupMap{}) pulumi.RegisterOutputType(SqlPoolWorkloadGroupOutput{}) pulumi.RegisterOutputType(SqlPoolWorkloadGroupArrayOutput{}) pulumi.RegisterOutputType(SqlPoolWorkloadGroupMapOutput{}) }
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/synapse/sparkPool.go
sdk/go/azure/synapse/sparkPool.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Synapse Spark 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("StorageV2"), // IsHnsEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // _, err = synapse.NewSparkPool(ctx, "example", &synapse.SparkPoolArgs{ // Name: pulumi.String("example"), // SynapseWorkspaceId: exampleWorkspace.ID(), // NodeSizeFamily: pulumi.String("MemoryOptimized"), // NodeSize: pulumi.String("Small"), // CacheSize: pulumi.Int(100), // AutoScale: &synapse.SparkPoolAutoScaleArgs{ // MaxNodeCount: pulumi.Int(50), // MinNodeCount: pulumi.Int(3), // }, // AutoPause: &synapse.SparkPoolAutoPauseArgs{ // DelayInMinutes: pulumi.Int(15), // }, // LibraryRequirement: &synapse.SparkPoolLibraryRequirementArgs{ // Content: pulumi.String("appnope==0.1.0\nbeautifulsoup4==4.6.3\n"), // Filename: pulumi.String("requirements.txt"), // }, // SparkConfig: &synapse.SparkPoolSparkConfigArgs{ // Content: pulumi.String("spark.shuffle.spill true\n"), // Filename: pulumi.String("config.txt"), // }, // SparkVersion: pulumi.String("3.5"), // Tags: pulumi.StringMap{ // "ENV": pulumi.String("Production"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse Spark Pool can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/sparkPool:SparkPool example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Synapse/workspaces/workspace1/bigDataPools/sparkPool1 // ``` type SparkPool struct { pulumi.CustomResourceState // An `autoPause` block as defined below. AutoPause SparkPoolAutoPausePtrOutput `pulumi:"autoPause"` // An `autoScale` block as defined below. Exactly one of `nodeCount` or `autoScale` must be specified. AutoScale SparkPoolAutoScalePtrOutput `pulumi:"autoScale"` // The cache size in the Spark Pool. CacheSize pulumi.IntPtrOutput `pulumi:"cacheSize"` // Indicates whether compute isolation is enabled or not. Defaults to `false`. ComputeIsolationEnabled pulumi.BoolPtrOutput `pulumi:"computeIsolationEnabled"` DynamicExecutorAllocationEnabled pulumi.BoolPtrOutput `pulumi:"dynamicExecutorAllocationEnabled"` LibraryRequirement SparkPoolLibraryRequirementPtrOutput `pulumi:"libraryRequirement"` MaxExecutors pulumi.IntPtrOutput `pulumi:"maxExecutors"` MinExecutors pulumi.IntPtrOutput `pulumi:"minExecutors"` // The name which should be used for this Synapse Spark Pool. Changing this forces a new Synapse Spark Pool to be created. Name pulumi.StringOutput `pulumi:"name"` // The number of nodes in the Spark Pool. Exactly one of `nodeCount` or `autoScale` must be specified. NodeCount pulumi.IntOutput `pulumi:"nodeCount"` // The level of node in the Spark Pool. Possible values are `Small`, `Medium`, `Large`, `None`, `XLarge`, `XXLarge` and `XXXLarge`. NodeSize pulumi.StringOutput `pulumi:"nodeSize"` // The kind of nodes that the Spark Pool provides. Possible values are `HardwareAcceleratedFPGA`, `HardwareAcceleratedGPU`, `MemoryOptimized`, and `None`. NodeSizeFamily pulumi.StringOutput `pulumi:"nodeSizeFamily"` SessionLevelPackagesEnabled pulumi.BoolPtrOutput `pulumi:"sessionLevelPackagesEnabled"` SparkConfig SparkPoolSparkConfigPtrOutput `pulumi:"sparkConfig"` SparkEventsFolder pulumi.StringPtrOutput `pulumi:"sparkEventsFolder"` SparkLogFolder pulumi.StringPtrOutput `pulumi:"sparkLogFolder"` // The Apache Spark version. Possible values are `3.4` and `3.5`. SparkVersion pulumi.StringOutput `pulumi:"sparkVersion"` // The ID of the Synapse Workspace where the Synapse Spark Pool should exist. Changing this forces a new Synapse Spark Pool to be created. SynapseWorkspaceId pulumi.StringOutput `pulumi:"synapseWorkspaceId"` Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewSparkPool registers a new resource with the given unique name, arguments, and options. func NewSparkPool(ctx *pulumi.Context, name string, args *SparkPoolArgs, opts ...pulumi.ResourceOption) (*SparkPool, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NodeSize == nil { return nil, errors.New("invalid value for required argument 'NodeSize'") } if args.NodeSizeFamily == nil { return nil, errors.New("invalid value for required argument 'NodeSizeFamily'") } if args.SparkVersion == nil { return nil, errors.New("invalid value for required argument 'SparkVersion'") } if args.SynapseWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'SynapseWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SparkPool err := ctx.RegisterResource("azure:synapse/sparkPool:SparkPool", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSparkPool gets an existing SparkPool 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 GetSparkPool(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SparkPoolState, opts ...pulumi.ResourceOption) (*SparkPool, error) { var resource SparkPool err := ctx.ReadResource("azure:synapse/sparkPool:SparkPool", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SparkPool resources. type sparkPoolState struct { // An `autoPause` block as defined below. AutoPause *SparkPoolAutoPause `pulumi:"autoPause"` // An `autoScale` block as defined below. Exactly one of `nodeCount` or `autoScale` must be specified. AutoScale *SparkPoolAutoScale `pulumi:"autoScale"` // The cache size in the Spark Pool. CacheSize *int `pulumi:"cacheSize"` // Indicates whether compute isolation is enabled or not. Defaults to `false`. ComputeIsolationEnabled *bool `pulumi:"computeIsolationEnabled"` DynamicExecutorAllocationEnabled *bool `pulumi:"dynamicExecutorAllocationEnabled"` LibraryRequirement *SparkPoolLibraryRequirement `pulumi:"libraryRequirement"` MaxExecutors *int `pulumi:"maxExecutors"` MinExecutors *int `pulumi:"minExecutors"` // The name which should be used for this Synapse Spark Pool. Changing this forces a new Synapse Spark Pool to be created. Name *string `pulumi:"name"` // The number of nodes in the Spark Pool. Exactly one of `nodeCount` or `autoScale` must be specified. NodeCount *int `pulumi:"nodeCount"` // The level of node in the Spark Pool. Possible values are `Small`, `Medium`, `Large`, `None`, `XLarge`, `XXLarge` and `XXXLarge`. NodeSize *string `pulumi:"nodeSize"` // The kind of nodes that the Spark Pool provides. Possible values are `HardwareAcceleratedFPGA`, `HardwareAcceleratedGPU`, `MemoryOptimized`, and `None`. NodeSizeFamily *string `pulumi:"nodeSizeFamily"` SessionLevelPackagesEnabled *bool `pulumi:"sessionLevelPackagesEnabled"` SparkConfig *SparkPoolSparkConfig `pulumi:"sparkConfig"` SparkEventsFolder *string `pulumi:"sparkEventsFolder"` SparkLogFolder *string `pulumi:"sparkLogFolder"` // The Apache Spark version. Possible values are `3.4` and `3.5`. SparkVersion *string `pulumi:"sparkVersion"` // The ID of the Synapse Workspace where the Synapse Spark Pool should exist. Changing this forces a new Synapse Spark Pool to be created. SynapseWorkspaceId *string `pulumi:"synapseWorkspaceId"` Tags map[string]string `pulumi:"tags"` } type SparkPoolState struct { // An `autoPause` block as defined below. AutoPause SparkPoolAutoPausePtrInput // An `autoScale` block as defined below. Exactly one of `nodeCount` or `autoScale` must be specified. AutoScale SparkPoolAutoScalePtrInput // The cache size in the Spark Pool. CacheSize pulumi.IntPtrInput // Indicates whether compute isolation is enabled or not. Defaults to `false`. ComputeIsolationEnabled pulumi.BoolPtrInput DynamicExecutorAllocationEnabled pulumi.BoolPtrInput LibraryRequirement SparkPoolLibraryRequirementPtrInput MaxExecutors pulumi.IntPtrInput MinExecutors pulumi.IntPtrInput // The name which should be used for this Synapse Spark Pool. Changing this forces a new Synapse Spark Pool to be created. Name pulumi.StringPtrInput // The number of nodes in the Spark Pool. Exactly one of `nodeCount` or `autoScale` must be specified. NodeCount pulumi.IntPtrInput // The level of node in the Spark Pool. Possible values are `Small`, `Medium`, `Large`, `None`, `XLarge`, `XXLarge` and `XXXLarge`. NodeSize pulumi.StringPtrInput // The kind of nodes that the Spark Pool provides. Possible values are `HardwareAcceleratedFPGA`, `HardwareAcceleratedGPU`, `MemoryOptimized`, and `None`. NodeSizeFamily pulumi.StringPtrInput SessionLevelPackagesEnabled pulumi.BoolPtrInput SparkConfig SparkPoolSparkConfigPtrInput SparkEventsFolder pulumi.StringPtrInput SparkLogFolder pulumi.StringPtrInput // The Apache Spark version. Possible values are `3.4` and `3.5`. SparkVersion pulumi.StringPtrInput // The ID of the Synapse Workspace where the Synapse Spark Pool should exist. Changing this forces a new Synapse Spark Pool to be created. SynapseWorkspaceId pulumi.StringPtrInput Tags pulumi.StringMapInput } func (SparkPoolState) ElementType() reflect.Type { return reflect.TypeOf((*sparkPoolState)(nil)).Elem() } type sparkPoolArgs struct { // An `autoPause` block as defined below. AutoPause *SparkPoolAutoPause `pulumi:"autoPause"` // An `autoScale` block as defined below. Exactly one of `nodeCount` or `autoScale` must be specified. AutoScale *SparkPoolAutoScale `pulumi:"autoScale"` // The cache size in the Spark Pool. CacheSize *int `pulumi:"cacheSize"` // Indicates whether compute isolation is enabled or not. Defaults to `false`. ComputeIsolationEnabled *bool `pulumi:"computeIsolationEnabled"` DynamicExecutorAllocationEnabled *bool `pulumi:"dynamicExecutorAllocationEnabled"` LibraryRequirement *SparkPoolLibraryRequirement `pulumi:"libraryRequirement"` MaxExecutors *int `pulumi:"maxExecutors"` MinExecutors *int `pulumi:"minExecutors"` // The name which should be used for this Synapse Spark Pool. Changing this forces a new Synapse Spark Pool to be created. Name *string `pulumi:"name"` // The number of nodes in the Spark Pool. Exactly one of `nodeCount` or `autoScale` must be specified. NodeCount *int `pulumi:"nodeCount"` // The level of node in the Spark Pool. Possible values are `Small`, `Medium`, `Large`, `None`, `XLarge`, `XXLarge` and `XXXLarge`. NodeSize string `pulumi:"nodeSize"` // The kind of nodes that the Spark Pool provides. Possible values are `HardwareAcceleratedFPGA`, `HardwareAcceleratedGPU`, `MemoryOptimized`, and `None`. NodeSizeFamily string `pulumi:"nodeSizeFamily"` SessionLevelPackagesEnabled *bool `pulumi:"sessionLevelPackagesEnabled"` SparkConfig *SparkPoolSparkConfig `pulumi:"sparkConfig"` SparkEventsFolder *string `pulumi:"sparkEventsFolder"` SparkLogFolder *string `pulumi:"sparkLogFolder"` // The Apache Spark version. Possible values are `3.4` and `3.5`. SparkVersion string `pulumi:"sparkVersion"` // The ID of the Synapse Workspace where the Synapse Spark Pool should exist. Changing this forces a new Synapse Spark Pool to be created. SynapseWorkspaceId string `pulumi:"synapseWorkspaceId"` Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a SparkPool resource. type SparkPoolArgs struct { // An `autoPause` block as defined below. AutoPause SparkPoolAutoPausePtrInput // An `autoScale` block as defined below. Exactly one of `nodeCount` or `autoScale` must be specified. AutoScale SparkPoolAutoScalePtrInput // The cache size in the Spark Pool. CacheSize pulumi.IntPtrInput // Indicates whether compute isolation is enabled or not. Defaults to `false`. ComputeIsolationEnabled pulumi.BoolPtrInput DynamicExecutorAllocationEnabled pulumi.BoolPtrInput LibraryRequirement SparkPoolLibraryRequirementPtrInput MaxExecutors pulumi.IntPtrInput MinExecutors pulumi.IntPtrInput // The name which should be used for this Synapse Spark Pool. Changing this forces a new Synapse Spark Pool to be created. Name pulumi.StringPtrInput // The number of nodes in the Spark Pool. Exactly one of `nodeCount` or `autoScale` must be specified. NodeCount pulumi.IntPtrInput // The level of node in the Spark Pool. Possible values are `Small`, `Medium`, `Large`, `None`, `XLarge`, `XXLarge` and `XXXLarge`. NodeSize pulumi.StringInput // The kind of nodes that the Spark Pool provides. Possible values are `HardwareAcceleratedFPGA`, `HardwareAcceleratedGPU`, `MemoryOptimized`, and `None`. NodeSizeFamily pulumi.StringInput SessionLevelPackagesEnabled pulumi.BoolPtrInput SparkConfig SparkPoolSparkConfigPtrInput SparkEventsFolder pulumi.StringPtrInput SparkLogFolder pulumi.StringPtrInput // The Apache Spark version. Possible values are `3.4` and `3.5`. SparkVersion pulumi.StringInput // The ID of the Synapse Workspace where the Synapse Spark Pool should exist. Changing this forces a new Synapse Spark Pool to be created. SynapseWorkspaceId pulumi.StringInput Tags pulumi.StringMapInput } func (SparkPoolArgs) ElementType() reflect.Type { return reflect.TypeOf((*sparkPoolArgs)(nil)).Elem() } type SparkPoolInput interface { pulumi.Input ToSparkPoolOutput() SparkPoolOutput ToSparkPoolOutputWithContext(ctx context.Context) SparkPoolOutput } func (*SparkPool) ElementType() reflect.Type { return reflect.TypeOf((**SparkPool)(nil)).Elem() } func (i *SparkPool) ToSparkPoolOutput() SparkPoolOutput { return i.ToSparkPoolOutputWithContext(context.Background()) } func (i *SparkPool) ToSparkPoolOutputWithContext(ctx context.Context) SparkPoolOutput { return pulumi.ToOutputWithContext(ctx, i).(SparkPoolOutput) } // SparkPoolArrayInput is an input type that accepts SparkPoolArray and SparkPoolArrayOutput values. // You can construct a concrete instance of `SparkPoolArrayInput` via: // // SparkPoolArray{ SparkPoolArgs{...} } type SparkPoolArrayInput interface { pulumi.Input ToSparkPoolArrayOutput() SparkPoolArrayOutput ToSparkPoolArrayOutputWithContext(context.Context) SparkPoolArrayOutput } type SparkPoolArray []SparkPoolInput func (SparkPoolArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SparkPool)(nil)).Elem() } func (i SparkPoolArray) ToSparkPoolArrayOutput() SparkPoolArrayOutput { return i.ToSparkPoolArrayOutputWithContext(context.Background()) } func (i SparkPoolArray) ToSparkPoolArrayOutputWithContext(ctx context.Context) SparkPoolArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SparkPoolArrayOutput) } // SparkPoolMapInput is an input type that accepts SparkPoolMap and SparkPoolMapOutput values. // You can construct a concrete instance of `SparkPoolMapInput` via: // // SparkPoolMap{ "key": SparkPoolArgs{...} } type SparkPoolMapInput interface { pulumi.Input ToSparkPoolMapOutput() SparkPoolMapOutput ToSparkPoolMapOutputWithContext(context.Context) SparkPoolMapOutput } type SparkPoolMap map[string]SparkPoolInput func (SparkPoolMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SparkPool)(nil)).Elem() } func (i SparkPoolMap) ToSparkPoolMapOutput() SparkPoolMapOutput { return i.ToSparkPoolMapOutputWithContext(context.Background()) } func (i SparkPoolMap) ToSparkPoolMapOutputWithContext(ctx context.Context) SparkPoolMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SparkPoolMapOutput) } type SparkPoolOutput struct{ *pulumi.OutputState } func (SparkPoolOutput) ElementType() reflect.Type { return reflect.TypeOf((**SparkPool)(nil)).Elem() } func (o SparkPoolOutput) ToSparkPoolOutput() SparkPoolOutput { return o } func (o SparkPoolOutput) ToSparkPoolOutputWithContext(ctx context.Context) SparkPoolOutput { return o } // An `autoPause` block as defined below. func (o SparkPoolOutput) AutoPause() SparkPoolAutoPausePtrOutput { return o.ApplyT(func(v *SparkPool) SparkPoolAutoPausePtrOutput { return v.AutoPause }).(SparkPoolAutoPausePtrOutput) } // An `autoScale` block as defined below. Exactly one of `nodeCount` or `autoScale` must be specified. func (o SparkPoolOutput) AutoScale() SparkPoolAutoScalePtrOutput { return o.ApplyT(func(v *SparkPool) SparkPoolAutoScalePtrOutput { return v.AutoScale }).(SparkPoolAutoScalePtrOutput) } // The cache size in the Spark Pool. func (o SparkPoolOutput) CacheSize() pulumi.IntPtrOutput { return o.ApplyT(func(v *SparkPool) pulumi.IntPtrOutput { return v.CacheSize }).(pulumi.IntPtrOutput) } // Indicates whether compute isolation is enabled or not. Defaults to `false`. func (o SparkPoolOutput) ComputeIsolationEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *SparkPool) pulumi.BoolPtrOutput { return v.ComputeIsolationEnabled }).(pulumi.BoolPtrOutput) } func (o SparkPoolOutput) DynamicExecutorAllocationEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *SparkPool) pulumi.BoolPtrOutput { return v.DynamicExecutorAllocationEnabled }).(pulumi.BoolPtrOutput) } func (o SparkPoolOutput) LibraryRequirement() SparkPoolLibraryRequirementPtrOutput { return o.ApplyT(func(v *SparkPool) SparkPoolLibraryRequirementPtrOutput { return v.LibraryRequirement }).(SparkPoolLibraryRequirementPtrOutput) } func (o SparkPoolOutput) MaxExecutors() pulumi.IntPtrOutput { return o.ApplyT(func(v *SparkPool) pulumi.IntPtrOutput { return v.MaxExecutors }).(pulumi.IntPtrOutput) } func (o SparkPoolOutput) MinExecutors() pulumi.IntPtrOutput { return o.ApplyT(func(v *SparkPool) pulumi.IntPtrOutput { return v.MinExecutors }).(pulumi.IntPtrOutput) } // The name which should be used for this Synapse Spark Pool. Changing this forces a new Synapse Spark Pool to be created. func (o SparkPoolOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SparkPool) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The number of nodes in the Spark Pool. Exactly one of `nodeCount` or `autoScale` must be specified. func (o SparkPoolOutput) NodeCount() pulumi.IntOutput { return o.ApplyT(func(v *SparkPool) pulumi.IntOutput { return v.NodeCount }).(pulumi.IntOutput) } // The level of node in the Spark Pool. Possible values are `Small`, `Medium`, `Large`, `None`, `XLarge`, `XXLarge` and `XXXLarge`. func (o SparkPoolOutput) NodeSize() pulumi.StringOutput { return o.ApplyT(func(v *SparkPool) pulumi.StringOutput { return v.NodeSize }).(pulumi.StringOutput) } // The kind of nodes that the Spark Pool provides. Possible values are `HardwareAcceleratedFPGA`, `HardwareAcceleratedGPU`, `MemoryOptimized`, and `None`. func (o SparkPoolOutput) NodeSizeFamily() pulumi.StringOutput { return o.ApplyT(func(v *SparkPool) pulumi.StringOutput { return v.NodeSizeFamily }).(pulumi.StringOutput) } func (o SparkPoolOutput) SessionLevelPackagesEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *SparkPool) pulumi.BoolPtrOutput { return v.SessionLevelPackagesEnabled }).(pulumi.BoolPtrOutput) } func (o SparkPoolOutput) SparkConfig() SparkPoolSparkConfigPtrOutput { return o.ApplyT(func(v *SparkPool) SparkPoolSparkConfigPtrOutput { return v.SparkConfig }).(SparkPoolSparkConfigPtrOutput) } func (o SparkPoolOutput) SparkEventsFolder() pulumi.StringPtrOutput { return o.ApplyT(func(v *SparkPool) pulumi.StringPtrOutput { return v.SparkEventsFolder }).(pulumi.StringPtrOutput) } func (o SparkPoolOutput) SparkLogFolder() pulumi.StringPtrOutput { return o.ApplyT(func(v *SparkPool) pulumi.StringPtrOutput { return v.SparkLogFolder }).(pulumi.StringPtrOutput) } // The Apache Spark version. Possible values are `3.4` and `3.5`. func (o SparkPoolOutput) SparkVersion() pulumi.StringOutput { return o.ApplyT(func(v *SparkPool) pulumi.StringOutput { return v.SparkVersion }).(pulumi.StringOutput) } // The ID of the Synapse Workspace where the Synapse Spark Pool should exist. Changing this forces a new Synapse Spark Pool to be created. func (o SparkPoolOutput) SynapseWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *SparkPool) pulumi.StringOutput { return v.SynapseWorkspaceId }).(pulumi.StringOutput) } func (o SparkPoolOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *SparkPool) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type SparkPoolArrayOutput struct{ *pulumi.OutputState } func (SparkPoolArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SparkPool)(nil)).Elem() } func (o SparkPoolArrayOutput) ToSparkPoolArrayOutput() SparkPoolArrayOutput { return o } func (o SparkPoolArrayOutput) ToSparkPoolArrayOutputWithContext(ctx context.Context) SparkPoolArrayOutput { return o } func (o SparkPoolArrayOutput) Index(i pulumi.IntInput) SparkPoolOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SparkPool { return vs[0].([]*SparkPool)[vs[1].(int)] }).(SparkPoolOutput) } type SparkPoolMapOutput struct{ *pulumi.OutputState } func (SparkPoolMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SparkPool)(nil)).Elem() } func (o SparkPoolMapOutput) ToSparkPoolMapOutput() SparkPoolMapOutput { return o } func (o SparkPoolMapOutput) ToSparkPoolMapOutputWithContext(ctx context.Context) SparkPoolMapOutput { return o } func (o SparkPoolMapOutput) MapIndex(k pulumi.StringInput) SparkPoolOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SparkPool { return vs[0].(map[string]*SparkPool)[vs[1].(string)] }).(SparkPoolOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SparkPoolInput)(nil)).Elem(), &SparkPool{}) pulumi.RegisterInputType(reflect.TypeOf((*SparkPoolArrayInput)(nil)).Elem(), SparkPoolArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SparkPoolMapInput)(nil)).Elem(), SparkPoolMap{}) pulumi.RegisterOutputType(SparkPoolOutput{}) pulumi.RegisterOutputType(SparkPoolArrayOutput{}) pulumi.RegisterOutputType(SparkPoolMapOutput{}) }
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/synapse/linkedService.go
sdk/go/azure/synapse/linkedService.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Synapse Linked Service. // // ## 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountKind: pulumi.String("BlobStorage"), // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // ManagedVirtualNetworkEnabled: pulumi.Bool(true), // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // exampleFirewallRule, err := synapse.NewFirewallRule(ctx, "example", &synapse.FirewallRuleArgs{ // Name: pulumi.String("allowAll"), // SynapseWorkspaceId: exampleWorkspace.ID(), // StartIpAddress: pulumi.String("0.0.0.0"), // EndIpAddress: pulumi.String("255.255.255.255"), // }) // if err != nil { // return err // } // exampleIntegrationRuntimeAzure, err := synapse.NewIntegrationRuntimeAzure(ctx, "example", &synapse.IntegrationRuntimeAzureArgs{ // Name: pulumi.String("example"), // SynapseWorkspaceId: exampleWorkspace.ID(), // Location: example.Location, // }) // if err != nil { // return err // } // _, err = synapse.NewLinkedService(ctx, "example", &synapse.LinkedServiceArgs{ // Name: pulumi.String("example"), // SynapseWorkspaceId: exampleWorkspace.ID(), // Type: pulumi.String("AzureBlobStorage"), // TypePropertiesJson: exampleAccount.PrimaryConnectionString.ApplyT(func(primaryConnectionString string) (string, error) { // return fmt.Sprintf("{\n \\\"connectionString\\\": \\\"%v\\\"\n}\n", primaryConnectionString), nil // }).(pulumi.StringOutput), // IntegrationRuntime: &synapse.LinkedServiceIntegrationRuntimeArgs{ // Name: exampleIntegrationRuntimeAzure.Name, // }, // }, pulumi.DependsOn([]pulumi.Resource{ // exampleFirewallRule, // })) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse Linked Services can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/linkedService:LinkedService example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Synapse/workspaces/workspace1/linkedServices/linkedservice1 // ``` type LinkedService struct { pulumi.CustomResourceState // A map of additional properties to associate with the Synapse Linked Service. AdditionalProperties pulumi.StringMapOutput `pulumi:"additionalProperties"` // List of tags that can be used for describing the Synapse Linked Service. Annotations pulumi.StringArrayOutput `pulumi:"annotations"` // The description for the Synapse Linked Service. Description pulumi.StringPtrOutput `pulumi:"description"` // A `integrationRuntime` block as defined below. IntegrationRuntime LinkedServiceIntegrationRuntimePtrOutput `pulumi:"integrationRuntime"` // The name which should be used for this Synapse Linked Service. Changing this forces a new Synapse Linked Service to be created. Name pulumi.StringOutput `pulumi:"name"` // A map of parameters to associate with the Synapse Linked Service. Parameters pulumi.StringMapOutput `pulumi:"parameters"` // The Synapse Workspace ID in which to associate the Linked Service with. Changing this forces a new Synapse Linked Service to be created. SynapseWorkspaceId pulumi.StringOutput `pulumi:"synapseWorkspaceId"` // The type of data stores that will be connected to Synapse. Valid Values include `AmazonMWS`, `AmazonRdsForOracle`, `AmazonRdsForSqlServer`, `AmazonRedshift`, `AmazonS3`, `AzureBatch`. Changing this forces a new resource to be created. // `AzureBlobFS`, `AzureBlobStorage`, `AzureDataExplorer`, `AzureDataLakeAnalytics`, `AzureDataLakeStore`, `AzureDatabricks`, `AzureDatabricksDeltaLake`, `AzureFileStorage`, `AzureFunction`, // `AzureKeyVault`, `AzureML`, `AzureMLService`, `AzureMariaDB`, `AzureMySql`, `AzurePostgreSql`, `AzureSqlDW`, `AzureSqlDatabase`, `AzureSqlMI`, `AzureSearch`, `AzureStorage`, // `AzureTableStorage`, `Cassandra`, `CommonDataServiceForApps`, `Concur`, `CosmosDb`, `CosmosDbMongoDbApi`, `Couchbase`, `CustomDataSource`, `Db2`, `Drill`, // `Dynamics`, `DynamicsAX`, `DynamicsCrm`, `Eloqua`, `FileServer`, `FtpServer`, `GoogleAdWords`, `GoogleBigQuery`, `GoogleCloudStorage`, `Greenplum`, `HBase`, `HDInsight`, // `HDInsightOnDemand`, `HttpServer`, `Hdfs`, `Hive`, `Hubspot`, `Impala`, `Informix`, `Jira`, `LinkedService`, `Magento`, `MariaDB`, `Marketo`, `MicrosoftAccess`, `MongoDb`, // `MongoDbAtlas`, `MongoDbV2`, `MySql`, `Netezza`, `OData`, `Odbc`, `Office365`, `Oracle`, `OracleServiceCloud`, `Paypal`, `Phoenix`, `PostgreSql`, `Presto`, `QuickBooks`, // `Responsys`, `RestService`, `SqlServer`, `Salesforce`, `SalesforceMarketingCloud`, `SalesforceServiceCloud`, `SapBW`, `SapCloudForCustomer`, `SapEcc`, `SapHana`, `SapOpenHub`, // `SapTable`, `ServiceNow`, `Sftp`, `SharePointOnlineList`, `Shopify`, `Snowflake`, `Spark`, `Square`, `Sybase`, `Teradata`, `Vertica`, `Web`, `Xero`, `Zoho`. Type pulumi.StringOutput `pulumi:"type"` // A JSON object that contains the properties of the Synapse Linked Service. TypePropertiesJson pulumi.StringOutput `pulumi:"typePropertiesJson"` } // NewLinkedService registers a new resource with the given unique name, arguments, and options. func NewLinkedService(ctx *pulumi.Context, name string, args *LinkedServiceArgs, opts ...pulumi.ResourceOption) (*LinkedService, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.SynapseWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'SynapseWorkspaceId'") } if args.Type == nil { return nil, errors.New("invalid value for required argument 'Type'") } if args.TypePropertiesJson == nil { return nil, errors.New("invalid value for required argument 'TypePropertiesJson'") } opts = internal.PkgResourceDefaultOpts(opts) var resource LinkedService err := ctx.RegisterResource("azure:synapse/linkedService:LinkedService", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetLinkedService gets an existing LinkedService 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 GetLinkedService(ctx *pulumi.Context, name string, id pulumi.IDInput, state *LinkedServiceState, opts ...pulumi.ResourceOption) (*LinkedService, error) { var resource LinkedService err := ctx.ReadResource("azure:synapse/linkedService:LinkedService", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering LinkedService resources. type linkedServiceState struct { // A map of additional properties to associate with the Synapse Linked Service. AdditionalProperties map[string]string `pulumi:"additionalProperties"` // List of tags that can be used for describing the Synapse Linked Service. Annotations []string `pulumi:"annotations"` // The description for the Synapse Linked Service. Description *string `pulumi:"description"` // A `integrationRuntime` block as defined below. IntegrationRuntime *LinkedServiceIntegrationRuntime `pulumi:"integrationRuntime"` // The name which should be used for this Synapse Linked Service. Changing this forces a new Synapse Linked Service to be created. Name *string `pulumi:"name"` // A map of parameters to associate with the Synapse Linked Service. Parameters map[string]string `pulumi:"parameters"` // The Synapse Workspace ID in which to associate the Linked Service with. Changing this forces a new Synapse Linked Service to be created. SynapseWorkspaceId *string `pulumi:"synapseWorkspaceId"` // The type of data stores that will be connected to Synapse. Valid Values include `AmazonMWS`, `AmazonRdsForOracle`, `AmazonRdsForSqlServer`, `AmazonRedshift`, `AmazonS3`, `AzureBatch`. Changing this forces a new resource to be created. // `AzureBlobFS`, `AzureBlobStorage`, `AzureDataExplorer`, `AzureDataLakeAnalytics`, `AzureDataLakeStore`, `AzureDatabricks`, `AzureDatabricksDeltaLake`, `AzureFileStorage`, `AzureFunction`, // `AzureKeyVault`, `AzureML`, `AzureMLService`, `AzureMariaDB`, `AzureMySql`, `AzurePostgreSql`, `AzureSqlDW`, `AzureSqlDatabase`, `AzureSqlMI`, `AzureSearch`, `AzureStorage`, // `AzureTableStorage`, `Cassandra`, `CommonDataServiceForApps`, `Concur`, `CosmosDb`, `CosmosDbMongoDbApi`, `Couchbase`, `CustomDataSource`, `Db2`, `Drill`, // `Dynamics`, `DynamicsAX`, `DynamicsCrm`, `Eloqua`, `FileServer`, `FtpServer`, `GoogleAdWords`, `GoogleBigQuery`, `GoogleCloudStorage`, `Greenplum`, `HBase`, `HDInsight`, // `HDInsightOnDemand`, `HttpServer`, `Hdfs`, `Hive`, `Hubspot`, `Impala`, `Informix`, `Jira`, `LinkedService`, `Magento`, `MariaDB`, `Marketo`, `MicrosoftAccess`, `MongoDb`, // `MongoDbAtlas`, `MongoDbV2`, `MySql`, `Netezza`, `OData`, `Odbc`, `Office365`, `Oracle`, `OracleServiceCloud`, `Paypal`, `Phoenix`, `PostgreSql`, `Presto`, `QuickBooks`, // `Responsys`, `RestService`, `SqlServer`, `Salesforce`, `SalesforceMarketingCloud`, `SalesforceServiceCloud`, `SapBW`, `SapCloudForCustomer`, `SapEcc`, `SapHana`, `SapOpenHub`, // `SapTable`, `ServiceNow`, `Sftp`, `SharePointOnlineList`, `Shopify`, `Snowflake`, `Spark`, `Square`, `Sybase`, `Teradata`, `Vertica`, `Web`, `Xero`, `Zoho`. Type *string `pulumi:"type"` // A JSON object that contains the properties of the Synapse Linked Service. TypePropertiesJson *string `pulumi:"typePropertiesJson"` } type LinkedServiceState struct { // A map of additional properties to associate with the Synapse Linked Service. AdditionalProperties pulumi.StringMapInput // List of tags that can be used for describing the Synapse Linked Service. Annotations pulumi.StringArrayInput // The description for the Synapse Linked Service. Description pulumi.StringPtrInput // A `integrationRuntime` block as defined below. IntegrationRuntime LinkedServiceIntegrationRuntimePtrInput // The name which should be used for this Synapse Linked Service. Changing this forces a new Synapse Linked Service to be created. Name pulumi.StringPtrInput // A map of parameters to associate with the Synapse Linked Service. Parameters pulumi.StringMapInput // The Synapse Workspace ID in which to associate the Linked Service with. Changing this forces a new Synapse Linked Service to be created. SynapseWorkspaceId pulumi.StringPtrInput // The type of data stores that will be connected to Synapse. Valid Values include `AmazonMWS`, `AmazonRdsForOracle`, `AmazonRdsForSqlServer`, `AmazonRedshift`, `AmazonS3`, `AzureBatch`. Changing this forces a new resource to be created. // `AzureBlobFS`, `AzureBlobStorage`, `AzureDataExplorer`, `AzureDataLakeAnalytics`, `AzureDataLakeStore`, `AzureDatabricks`, `AzureDatabricksDeltaLake`, `AzureFileStorage`, `AzureFunction`, // `AzureKeyVault`, `AzureML`, `AzureMLService`, `AzureMariaDB`, `AzureMySql`, `AzurePostgreSql`, `AzureSqlDW`, `AzureSqlDatabase`, `AzureSqlMI`, `AzureSearch`, `AzureStorage`, // `AzureTableStorage`, `Cassandra`, `CommonDataServiceForApps`, `Concur`, `CosmosDb`, `CosmosDbMongoDbApi`, `Couchbase`, `CustomDataSource`, `Db2`, `Drill`, // `Dynamics`, `DynamicsAX`, `DynamicsCrm`, `Eloqua`, `FileServer`, `FtpServer`, `GoogleAdWords`, `GoogleBigQuery`, `GoogleCloudStorage`, `Greenplum`, `HBase`, `HDInsight`, // `HDInsightOnDemand`, `HttpServer`, `Hdfs`, `Hive`, `Hubspot`, `Impala`, `Informix`, `Jira`, `LinkedService`, `Magento`, `MariaDB`, `Marketo`, `MicrosoftAccess`, `MongoDb`, // `MongoDbAtlas`, `MongoDbV2`, `MySql`, `Netezza`, `OData`, `Odbc`, `Office365`, `Oracle`, `OracleServiceCloud`, `Paypal`, `Phoenix`, `PostgreSql`, `Presto`, `QuickBooks`, // `Responsys`, `RestService`, `SqlServer`, `Salesforce`, `SalesforceMarketingCloud`, `SalesforceServiceCloud`, `SapBW`, `SapCloudForCustomer`, `SapEcc`, `SapHana`, `SapOpenHub`, // `SapTable`, `ServiceNow`, `Sftp`, `SharePointOnlineList`, `Shopify`, `Snowflake`, `Spark`, `Square`, `Sybase`, `Teradata`, `Vertica`, `Web`, `Xero`, `Zoho`. Type pulumi.StringPtrInput // A JSON object that contains the properties of the Synapse Linked Service. TypePropertiesJson pulumi.StringPtrInput } func (LinkedServiceState) ElementType() reflect.Type { return reflect.TypeOf((*linkedServiceState)(nil)).Elem() } type linkedServiceArgs struct { // A map of additional properties to associate with the Synapse Linked Service. AdditionalProperties map[string]string `pulumi:"additionalProperties"` // List of tags that can be used for describing the Synapse Linked Service. Annotations []string `pulumi:"annotations"` // The description for the Synapse Linked Service. Description *string `pulumi:"description"` // A `integrationRuntime` block as defined below. IntegrationRuntime *LinkedServiceIntegrationRuntime `pulumi:"integrationRuntime"` // The name which should be used for this Synapse Linked Service. Changing this forces a new Synapse Linked Service to be created. Name *string `pulumi:"name"` // A map of parameters to associate with the Synapse Linked Service. Parameters map[string]string `pulumi:"parameters"` // The Synapse Workspace ID in which to associate the Linked Service with. Changing this forces a new Synapse Linked Service to be created. SynapseWorkspaceId string `pulumi:"synapseWorkspaceId"` // The type of data stores that will be connected to Synapse. Valid Values include `AmazonMWS`, `AmazonRdsForOracle`, `AmazonRdsForSqlServer`, `AmazonRedshift`, `AmazonS3`, `AzureBatch`. Changing this forces a new resource to be created. // `AzureBlobFS`, `AzureBlobStorage`, `AzureDataExplorer`, `AzureDataLakeAnalytics`, `AzureDataLakeStore`, `AzureDatabricks`, `AzureDatabricksDeltaLake`, `AzureFileStorage`, `AzureFunction`, // `AzureKeyVault`, `AzureML`, `AzureMLService`, `AzureMariaDB`, `AzureMySql`, `AzurePostgreSql`, `AzureSqlDW`, `AzureSqlDatabase`, `AzureSqlMI`, `AzureSearch`, `AzureStorage`, // `AzureTableStorage`, `Cassandra`, `CommonDataServiceForApps`, `Concur`, `CosmosDb`, `CosmosDbMongoDbApi`, `Couchbase`, `CustomDataSource`, `Db2`, `Drill`, // `Dynamics`, `DynamicsAX`, `DynamicsCrm`, `Eloqua`, `FileServer`, `FtpServer`, `GoogleAdWords`, `GoogleBigQuery`, `GoogleCloudStorage`, `Greenplum`, `HBase`, `HDInsight`, // `HDInsightOnDemand`, `HttpServer`, `Hdfs`, `Hive`, `Hubspot`, `Impala`, `Informix`, `Jira`, `LinkedService`, `Magento`, `MariaDB`, `Marketo`, `MicrosoftAccess`, `MongoDb`, // `MongoDbAtlas`, `MongoDbV2`, `MySql`, `Netezza`, `OData`, `Odbc`, `Office365`, `Oracle`, `OracleServiceCloud`, `Paypal`, `Phoenix`, `PostgreSql`, `Presto`, `QuickBooks`, // `Responsys`, `RestService`, `SqlServer`, `Salesforce`, `SalesforceMarketingCloud`, `SalesforceServiceCloud`, `SapBW`, `SapCloudForCustomer`, `SapEcc`, `SapHana`, `SapOpenHub`, // `SapTable`, `ServiceNow`, `Sftp`, `SharePointOnlineList`, `Shopify`, `Snowflake`, `Spark`, `Square`, `Sybase`, `Teradata`, `Vertica`, `Web`, `Xero`, `Zoho`. Type string `pulumi:"type"` // A JSON object that contains the properties of the Synapse Linked Service. TypePropertiesJson string `pulumi:"typePropertiesJson"` } // The set of arguments for constructing a LinkedService resource. type LinkedServiceArgs struct { // A map of additional properties to associate with the Synapse Linked Service. AdditionalProperties pulumi.StringMapInput // List of tags that can be used for describing the Synapse Linked Service. Annotations pulumi.StringArrayInput // The description for the Synapse Linked Service. Description pulumi.StringPtrInput // A `integrationRuntime` block as defined below. IntegrationRuntime LinkedServiceIntegrationRuntimePtrInput // The name which should be used for this Synapse Linked Service. Changing this forces a new Synapse Linked Service to be created. Name pulumi.StringPtrInput // A map of parameters to associate with the Synapse Linked Service. Parameters pulumi.StringMapInput // The Synapse Workspace ID in which to associate the Linked Service with. Changing this forces a new Synapse Linked Service to be created. SynapseWorkspaceId pulumi.StringInput // The type of data stores that will be connected to Synapse. Valid Values include `AmazonMWS`, `AmazonRdsForOracle`, `AmazonRdsForSqlServer`, `AmazonRedshift`, `AmazonS3`, `AzureBatch`. Changing this forces a new resource to be created. // `AzureBlobFS`, `AzureBlobStorage`, `AzureDataExplorer`, `AzureDataLakeAnalytics`, `AzureDataLakeStore`, `AzureDatabricks`, `AzureDatabricksDeltaLake`, `AzureFileStorage`, `AzureFunction`, // `AzureKeyVault`, `AzureML`, `AzureMLService`, `AzureMariaDB`, `AzureMySql`, `AzurePostgreSql`, `AzureSqlDW`, `AzureSqlDatabase`, `AzureSqlMI`, `AzureSearch`, `AzureStorage`, // `AzureTableStorage`, `Cassandra`, `CommonDataServiceForApps`, `Concur`, `CosmosDb`, `CosmosDbMongoDbApi`, `Couchbase`, `CustomDataSource`, `Db2`, `Drill`, // `Dynamics`, `DynamicsAX`, `DynamicsCrm`, `Eloqua`, `FileServer`, `FtpServer`, `GoogleAdWords`, `GoogleBigQuery`, `GoogleCloudStorage`, `Greenplum`, `HBase`, `HDInsight`, // `HDInsightOnDemand`, `HttpServer`, `Hdfs`, `Hive`, `Hubspot`, `Impala`, `Informix`, `Jira`, `LinkedService`, `Magento`, `MariaDB`, `Marketo`, `MicrosoftAccess`, `MongoDb`, // `MongoDbAtlas`, `MongoDbV2`, `MySql`, `Netezza`, `OData`, `Odbc`, `Office365`, `Oracle`, `OracleServiceCloud`, `Paypal`, `Phoenix`, `PostgreSql`, `Presto`, `QuickBooks`, // `Responsys`, `RestService`, `SqlServer`, `Salesforce`, `SalesforceMarketingCloud`, `SalesforceServiceCloud`, `SapBW`, `SapCloudForCustomer`, `SapEcc`, `SapHana`, `SapOpenHub`, // `SapTable`, `ServiceNow`, `Sftp`, `SharePointOnlineList`, `Shopify`, `Snowflake`, `Spark`, `Square`, `Sybase`, `Teradata`, `Vertica`, `Web`, `Xero`, `Zoho`. Type pulumi.StringInput // A JSON object that contains the properties of the Synapse Linked Service. TypePropertiesJson pulumi.StringInput } func (LinkedServiceArgs) ElementType() reflect.Type { return reflect.TypeOf((*linkedServiceArgs)(nil)).Elem() } type LinkedServiceInput interface { pulumi.Input ToLinkedServiceOutput() LinkedServiceOutput ToLinkedServiceOutputWithContext(ctx context.Context) LinkedServiceOutput } func (*LinkedService) ElementType() reflect.Type { return reflect.TypeOf((**LinkedService)(nil)).Elem() } func (i *LinkedService) ToLinkedServiceOutput() LinkedServiceOutput { return i.ToLinkedServiceOutputWithContext(context.Background()) } func (i *LinkedService) ToLinkedServiceOutputWithContext(ctx context.Context) LinkedServiceOutput { return pulumi.ToOutputWithContext(ctx, i).(LinkedServiceOutput) } // LinkedServiceArrayInput is an input type that accepts LinkedServiceArray and LinkedServiceArrayOutput values. // You can construct a concrete instance of `LinkedServiceArrayInput` via: // // LinkedServiceArray{ LinkedServiceArgs{...} } type LinkedServiceArrayInput interface { pulumi.Input ToLinkedServiceArrayOutput() LinkedServiceArrayOutput ToLinkedServiceArrayOutputWithContext(context.Context) LinkedServiceArrayOutput } type LinkedServiceArray []LinkedServiceInput func (LinkedServiceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*LinkedService)(nil)).Elem() } func (i LinkedServiceArray) ToLinkedServiceArrayOutput() LinkedServiceArrayOutput { return i.ToLinkedServiceArrayOutputWithContext(context.Background()) } func (i LinkedServiceArray) ToLinkedServiceArrayOutputWithContext(ctx context.Context) LinkedServiceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(LinkedServiceArrayOutput) } // LinkedServiceMapInput is an input type that accepts LinkedServiceMap and LinkedServiceMapOutput values. // You can construct a concrete instance of `LinkedServiceMapInput` via: // // LinkedServiceMap{ "key": LinkedServiceArgs{...} } type LinkedServiceMapInput interface { pulumi.Input ToLinkedServiceMapOutput() LinkedServiceMapOutput ToLinkedServiceMapOutputWithContext(context.Context) LinkedServiceMapOutput } type LinkedServiceMap map[string]LinkedServiceInput func (LinkedServiceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LinkedService)(nil)).Elem() } func (i LinkedServiceMap) ToLinkedServiceMapOutput() LinkedServiceMapOutput { return i.ToLinkedServiceMapOutputWithContext(context.Background()) } func (i LinkedServiceMap) ToLinkedServiceMapOutputWithContext(ctx context.Context) LinkedServiceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(LinkedServiceMapOutput) } type LinkedServiceOutput struct{ *pulumi.OutputState } func (LinkedServiceOutput) ElementType() reflect.Type { return reflect.TypeOf((**LinkedService)(nil)).Elem() } func (o LinkedServiceOutput) ToLinkedServiceOutput() LinkedServiceOutput { return o } func (o LinkedServiceOutput) ToLinkedServiceOutputWithContext(ctx context.Context) LinkedServiceOutput { return o } // A map of additional properties to associate with the Synapse Linked Service. func (o LinkedServiceOutput) AdditionalProperties() pulumi.StringMapOutput { return o.ApplyT(func(v *LinkedService) pulumi.StringMapOutput { return v.AdditionalProperties }).(pulumi.StringMapOutput) } // List of tags that can be used for describing the Synapse Linked Service. func (o LinkedServiceOutput) Annotations() pulumi.StringArrayOutput { return o.ApplyT(func(v *LinkedService) pulumi.StringArrayOutput { return v.Annotations }).(pulumi.StringArrayOutput) } // The description for the Synapse Linked Service. func (o LinkedServiceOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *LinkedService) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // A `integrationRuntime` block as defined below. func (o LinkedServiceOutput) IntegrationRuntime() LinkedServiceIntegrationRuntimePtrOutput { return o.ApplyT(func(v *LinkedService) LinkedServiceIntegrationRuntimePtrOutput { return v.IntegrationRuntime }).(LinkedServiceIntegrationRuntimePtrOutput) } // The name which should be used for this Synapse Linked Service. Changing this forces a new Synapse Linked Service to be created. func (o LinkedServiceOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *LinkedService) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A map of parameters to associate with the Synapse Linked Service. func (o LinkedServiceOutput) Parameters() pulumi.StringMapOutput { return o.ApplyT(func(v *LinkedService) pulumi.StringMapOutput { return v.Parameters }).(pulumi.StringMapOutput) } // The Synapse Workspace ID in which to associate the Linked Service with. Changing this forces a new Synapse Linked Service to be created. func (o LinkedServiceOutput) SynapseWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *LinkedService) pulumi.StringOutput { return v.SynapseWorkspaceId }).(pulumi.StringOutput) } // The type of data stores that will be connected to Synapse. Valid Values include `AmazonMWS`, `AmazonRdsForOracle`, `AmazonRdsForSqlServer`, `AmazonRedshift`, `AmazonS3`, `AzureBatch`. Changing this forces a new resource to be created. // `AzureBlobFS`, `AzureBlobStorage`, `AzureDataExplorer`, `AzureDataLakeAnalytics`, `AzureDataLakeStore`, `AzureDatabricks`, `AzureDatabricksDeltaLake`, `AzureFileStorage`, `AzureFunction`, // `AzureKeyVault`, `AzureML`, `AzureMLService`, `AzureMariaDB`, `AzureMySql`, `AzurePostgreSql`, `AzureSqlDW`, `AzureSqlDatabase`, `AzureSqlMI`, `AzureSearch`, `AzureStorage`, // `AzureTableStorage`, `Cassandra`, `CommonDataServiceForApps`, `Concur`, `CosmosDb`, `CosmosDbMongoDbApi`, `Couchbase`, `CustomDataSource`, `Db2`, `Drill`, // `Dynamics`, `DynamicsAX`, `DynamicsCrm`, `Eloqua`, `FileServer`, `FtpServer`, `GoogleAdWords`, `GoogleBigQuery`, `GoogleCloudStorage`, `Greenplum`, `HBase`, `HDInsight`, // `HDInsightOnDemand`, `HttpServer`, `Hdfs`, `Hive`, `Hubspot`, `Impala`, `Informix`, `Jira`, `LinkedService`, `Magento`, `MariaDB`, `Marketo`, `MicrosoftAccess`, `MongoDb`, // `MongoDbAtlas`, `MongoDbV2`, `MySql`, `Netezza`, `OData`, `Odbc`, `Office365`, `Oracle`, `OracleServiceCloud`, `Paypal`, `Phoenix`, `PostgreSql`, `Presto`, `QuickBooks`, // `Responsys`, `RestService`, `SqlServer`, `Salesforce`, `SalesforceMarketingCloud`, `SalesforceServiceCloud`, `SapBW`, `SapCloudForCustomer`, `SapEcc`, `SapHana`, `SapOpenHub`, // `SapTable`, `ServiceNow`, `Sftp`, `SharePointOnlineList`, `Shopify`, `Snowflake`, `Spark`, `Square`, `Sybase`, `Teradata`, `Vertica`, `Web`, `Xero`, `Zoho`. func (o LinkedServiceOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v *LinkedService) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput) } // A JSON object that contains the properties of the Synapse Linked Service. func (o LinkedServiceOutput) TypePropertiesJson() pulumi.StringOutput { return o.ApplyT(func(v *LinkedService) pulumi.StringOutput { return v.TypePropertiesJson }).(pulumi.StringOutput) } type LinkedServiceArrayOutput struct{ *pulumi.OutputState } func (LinkedServiceArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*LinkedService)(nil)).Elem() } func (o LinkedServiceArrayOutput) ToLinkedServiceArrayOutput() LinkedServiceArrayOutput { return o } func (o LinkedServiceArrayOutput) ToLinkedServiceArrayOutputWithContext(ctx context.Context) LinkedServiceArrayOutput { return o } func (o LinkedServiceArrayOutput) Index(i pulumi.IntInput) LinkedServiceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LinkedService { return vs[0].([]*LinkedService)[vs[1].(int)] }).(LinkedServiceOutput) } type LinkedServiceMapOutput struct{ *pulumi.OutputState } func (LinkedServiceMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LinkedService)(nil)).Elem() } func (o LinkedServiceMapOutput) ToLinkedServiceMapOutput() LinkedServiceMapOutput { return o } func (o LinkedServiceMapOutput) ToLinkedServiceMapOutputWithContext(ctx context.Context) LinkedServiceMapOutput { return o } func (o LinkedServiceMapOutput) MapIndex(k pulumi.StringInput) LinkedServiceOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LinkedService { return vs[0].(map[string]*LinkedService)[vs[1].(string)] }).(LinkedServiceOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*LinkedServiceInput)(nil)).Elem(), &LinkedService{}) pulumi.RegisterInputType(reflect.TypeOf((*LinkedServiceArrayInput)(nil)).Elem(), LinkedServiceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*LinkedServiceMapInput)(nil)).Elem(), LinkedServiceMap{}) pulumi.RegisterOutputType(LinkedServiceOutput{}) pulumi.RegisterOutputType(LinkedServiceArrayOutput{}) pulumi.RegisterOutputType(LinkedServiceMapOutput{}) }
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/synapse/roleAssignment.go
sdk/go/azure/synapse/roleAssignment.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Synapse Role Assignment. // // ## 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("StorageV2"), // IsHnsEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // exampleFirewallRule, err := synapse.NewFirewallRule(ctx, "example", &synapse.FirewallRuleArgs{ // Name: pulumi.String("AllowAll"), // SynapseWorkspaceId: exampleWorkspace.ID(), // StartIpAddress: pulumi.String("0.0.0.0"), // EndIpAddress: pulumi.String("255.255.255.255"), // }) // if err != nil { // return err // } // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // _, err = synapse.NewRoleAssignment(ctx, "example", &synapse.RoleAssignmentArgs{ // SynapseWorkspaceId: exampleWorkspace.ID(), // RoleName: pulumi.String("Synapse SQL Administrator"), // PrincipalId: pulumi.String(current.ObjectId), // }, pulumi.DependsOn([]pulumi.Resource{ // exampleFirewallRule, // })) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse Role Assignment can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/roleAssignment:RoleAssignment example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Synapse/workspaces/workspace1|000000000000" // ``` type RoleAssignment struct { pulumi.CustomResourceState // The ID of the Principal (User, Group or Service Principal) to assign the Synapse Role Definition to. Changing this forces a new resource to be created. PrincipalId pulumi.StringOutput `pulumi:"principalId"` // The Type of the Principal. One of `User`, `Group` or `ServicePrincipal`. Changing this forces a new resource to be created. // // > **NOTE:** While `principalType` is optional, it's still recommended to set this value, as some Synapse use-cases may not work correctly if this is not specified. Service Principals for example can't run SQL statements using `Entra ID` authentication if `principalType` is not set to `ServicePrincipal`. PrincipalType pulumi.StringPtrOutput `pulumi:"principalType"` // The Role Name of the Synapse Built-In Role. Possible values are `Apache Spark Administrator`, `Synapse Administrator`, `Synapse Artifact Publisher`, `Synapse Artifact User`, `Synapse Compute Operator`, `Synapse Contributor`, `Synapse Credential User`, `Synapse Linked Data Manager`, `Synapse Monitoring Operator`, `Synapse SQL Administrator` and `Synapse User`. Changing this forces a new resource to be created. // // > **NOTE:** Currently, the Synapse built-in roles are `Apache Spark Administrator`, `Synapse Administrator`, `Synapse Artifact Publisher`, `Synapse Artifact User`, `Synapse Compute Operator`, `Synapse Contributor`, `Synapse Credential User`, `Synapse Linked Data Manager`, `Synapse Monitoring Operator`, `Synapse SQL Administrator` and `Synapse User`. // // > **NOTE:** Old roles are still supported: `Workspace Admin`, `Apache Spark Admin`, `Sql Admin`. These values will be removed in the next Major Version 3.0. RoleName pulumi.StringOutput `pulumi:"roleName"` // The Synapse Spark Pool which the Synapse Role Assignment applies to. Changing this forces a new resource to be created. // // > **NOTE:** A Synapse firewall rule including local IP is needed to allow access. Only one of `synapseWorkspaceId`, `synapseSparkPoolId` must be set. SynapseSparkPoolId pulumi.StringPtrOutput `pulumi:"synapseSparkPoolId"` // The Synapse Workspace which the Synapse Role Assignment applies to. Changing this forces a new resource to be created. SynapseWorkspaceId pulumi.StringPtrOutput `pulumi:"synapseWorkspaceId"` } // NewRoleAssignment registers a new resource with the given unique name, arguments, and options. func NewRoleAssignment(ctx *pulumi.Context, name string, args *RoleAssignmentArgs, opts ...pulumi.ResourceOption) (*RoleAssignment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PrincipalId == nil { return nil, errors.New("invalid value for required argument 'PrincipalId'") } if args.RoleName == nil { return nil, errors.New("invalid value for required argument 'RoleName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource RoleAssignment err := ctx.RegisterResource("azure:synapse/roleAssignment:RoleAssignment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetRoleAssignment gets an existing RoleAssignment 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 GetRoleAssignment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RoleAssignmentState, opts ...pulumi.ResourceOption) (*RoleAssignment, error) { var resource RoleAssignment err := ctx.ReadResource("azure:synapse/roleAssignment:RoleAssignment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering RoleAssignment resources. type roleAssignmentState struct { // The ID of the Principal (User, Group or Service Principal) to assign the Synapse Role Definition to. Changing this forces a new resource to be created. PrincipalId *string `pulumi:"principalId"` // The Type of the Principal. One of `User`, `Group` or `ServicePrincipal`. Changing this forces a new resource to be created. // // > **NOTE:** While `principalType` is optional, it's still recommended to set this value, as some Synapse use-cases may not work correctly if this is not specified. Service Principals for example can't run SQL statements using `Entra ID` authentication if `principalType` is not set to `ServicePrincipal`. PrincipalType *string `pulumi:"principalType"` // The Role Name of the Synapse Built-In Role. Possible values are `Apache Spark Administrator`, `Synapse Administrator`, `Synapse Artifact Publisher`, `Synapse Artifact User`, `Synapse Compute Operator`, `Synapse Contributor`, `Synapse Credential User`, `Synapse Linked Data Manager`, `Synapse Monitoring Operator`, `Synapse SQL Administrator` and `Synapse User`. Changing this forces a new resource to be created. // // > **NOTE:** Currently, the Synapse built-in roles are `Apache Spark Administrator`, `Synapse Administrator`, `Synapse Artifact Publisher`, `Synapse Artifact User`, `Synapse Compute Operator`, `Synapse Contributor`, `Synapse Credential User`, `Synapse Linked Data Manager`, `Synapse Monitoring Operator`, `Synapse SQL Administrator` and `Synapse User`. // // > **NOTE:** Old roles are still supported: `Workspace Admin`, `Apache Spark Admin`, `Sql Admin`. These values will be removed in the next Major Version 3.0. RoleName *string `pulumi:"roleName"` // The Synapse Spark Pool which the Synapse Role Assignment applies to. Changing this forces a new resource to be created. // // > **NOTE:** A Synapse firewall rule including local IP is needed to allow access. Only one of `synapseWorkspaceId`, `synapseSparkPoolId` must be set. SynapseSparkPoolId *string `pulumi:"synapseSparkPoolId"` // The Synapse Workspace which the Synapse Role Assignment applies to. Changing this forces a new resource to be created. SynapseWorkspaceId *string `pulumi:"synapseWorkspaceId"` } type RoleAssignmentState struct { // The ID of the Principal (User, Group or Service Principal) to assign the Synapse Role Definition to. Changing this forces a new resource to be created. PrincipalId pulumi.StringPtrInput // The Type of the Principal. One of `User`, `Group` or `ServicePrincipal`. Changing this forces a new resource to be created. // // > **NOTE:** While `principalType` is optional, it's still recommended to set this value, as some Synapse use-cases may not work correctly if this is not specified. Service Principals for example can't run SQL statements using `Entra ID` authentication if `principalType` is not set to `ServicePrincipal`. PrincipalType pulumi.StringPtrInput // The Role Name of the Synapse Built-In Role. Possible values are `Apache Spark Administrator`, `Synapse Administrator`, `Synapse Artifact Publisher`, `Synapse Artifact User`, `Synapse Compute Operator`, `Synapse Contributor`, `Synapse Credential User`, `Synapse Linked Data Manager`, `Synapse Monitoring Operator`, `Synapse SQL Administrator` and `Synapse User`. Changing this forces a new resource to be created. // // > **NOTE:** Currently, the Synapse built-in roles are `Apache Spark Administrator`, `Synapse Administrator`, `Synapse Artifact Publisher`, `Synapse Artifact User`, `Synapse Compute Operator`, `Synapse Contributor`, `Synapse Credential User`, `Synapse Linked Data Manager`, `Synapse Monitoring Operator`, `Synapse SQL Administrator` and `Synapse User`. // // > **NOTE:** Old roles are still supported: `Workspace Admin`, `Apache Spark Admin`, `Sql Admin`. These values will be removed in the next Major Version 3.0. RoleName pulumi.StringPtrInput // The Synapse Spark Pool which the Synapse Role Assignment applies to. Changing this forces a new resource to be created. // // > **NOTE:** A Synapse firewall rule including local IP is needed to allow access. Only one of `synapseWorkspaceId`, `synapseSparkPoolId` must be set. SynapseSparkPoolId pulumi.StringPtrInput // The Synapse Workspace which the Synapse Role Assignment applies to. Changing this forces a new resource to be created. SynapseWorkspaceId pulumi.StringPtrInput } func (RoleAssignmentState) ElementType() reflect.Type { return reflect.TypeOf((*roleAssignmentState)(nil)).Elem() } type roleAssignmentArgs struct { // The ID of the Principal (User, Group or Service Principal) to assign the Synapse Role Definition to. Changing this forces a new resource to be created. PrincipalId string `pulumi:"principalId"` // The Type of the Principal. One of `User`, `Group` or `ServicePrincipal`. Changing this forces a new resource to be created. // // > **NOTE:** While `principalType` is optional, it's still recommended to set this value, as some Synapse use-cases may not work correctly if this is not specified. Service Principals for example can't run SQL statements using `Entra ID` authentication if `principalType` is not set to `ServicePrincipal`. PrincipalType *string `pulumi:"principalType"` // The Role Name of the Synapse Built-In Role. Possible values are `Apache Spark Administrator`, `Synapse Administrator`, `Synapse Artifact Publisher`, `Synapse Artifact User`, `Synapse Compute Operator`, `Synapse Contributor`, `Synapse Credential User`, `Synapse Linked Data Manager`, `Synapse Monitoring Operator`, `Synapse SQL Administrator` and `Synapse User`. Changing this forces a new resource to be created. // // > **NOTE:** Currently, the Synapse built-in roles are `Apache Spark Administrator`, `Synapse Administrator`, `Synapse Artifact Publisher`, `Synapse Artifact User`, `Synapse Compute Operator`, `Synapse Contributor`, `Synapse Credential User`, `Synapse Linked Data Manager`, `Synapse Monitoring Operator`, `Synapse SQL Administrator` and `Synapse User`. // // > **NOTE:** Old roles are still supported: `Workspace Admin`, `Apache Spark Admin`, `Sql Admin`. These values will be removed in the next Major Version 3.0. RoleName string `pulumi:"roleName"` // The Synapse Spark Pool which the Synapse Role Assignment applies to. Changing this forces a new resource to be created. // // > **NOTE:** A Synapse firewall rule including local IP is needed to allow access. Only one of `synapseWorkspaceId`, `synapseSparkPoolId` must be set. SynapseSparkPoolId *string `pulumi:"synapseSparkPoolId"` // The Synapse Workspace which the Synapse Role Assignment applies to. Changing this forces a new resource to be created. SynapseWorkspaceId *string `pulumi:"synapseWorkspaceId"` } // The set of arguments for constructing a RoleAssignment resource. type RoleAssignmentArgs struct { // The ID of the Principal (User, Group or Service Principal) to assign the Synapse Role Definition to. Changing this forces a new resource to be created. PrincipalId pulumi.StringInput // The Type of the Principal. One of `User`, `Group` or `ServicePrincipal`. Changing this forces a new resource to be created. // // > **NOTE:** While `principalType` is optional, it's still recommended to set this value, as some Synapse use-cases may not work correctly if this is not specified. Service Principals for example can't run SQL statements using `Entra ID` authentication if `principalType` is not set to `ServicePrincipal`. PrincipalType pulumi.StringPtrInput // The Role Name of the Synapse Built-In Role. Possible values are `Apache Spark Administrator`, `Synapse Administrator`, `Synapse Artifact Publisher`, `Synapse Artifact User`, `Synapse Compute Operator`, `Synapse Contributor`, `Synapse Credential User`, `Synapse Linked Data Manager`, `Synapse Monitoring Operator`, `Synapse SQL Administrator` and `Synapse User`. Changing this forces a new resource to be created. // // > **NOTE:** Currently, the Synapse built-in roles are `Apache Spark Administrator`, `Synapse Administrator`, `Synapse Artifact Publisher`, `Synapse Artifact User`, `Synapse Compute Operator`, `Synapse Contributor`, `Synapse Credential User`, `Synapse Linked Data Manager`, `Synapse Monitoring Operator`, `Synapse SQL Administrator` and `Synapse User`. // // > **NOTE:** Old roles are still supported: `Workspace Admin`, `Apache Spark Admin`, `Sql Admin`. These values will be removed in the next Major Version 3.0. RoleName pulumi.StringInput // The Synapse Spark Pool which the Synapse Role Assignment applies to. Changing this forces a new resource to be created. // // > **NOTE:** A Synapse firewall rule including local IP is needed to allow access. Only one of `synapseWorkspaceId`, `synapseSparkPoolId` must be set. SynapseSparkPoolId pulumi.StringPtrInput // The Synapse Workspace which the Synapse Role Assignment applies to. Changing this forces a new resource to be created. SynapseWorkspaceId pulumi.StringPtrInput } func (RoleAssignmentArgs) ElementType() reflect.Type { return reflect.TypeOf((*roleAssignmentArgs)(nil)).Elem() } type RoleAssignmentInput interface { pulumi.Input ToRoleAssignmentOutput() RoleAssignmentOutput ToRoleAssignmentOutputWithContext(ctx context.Context) RoleAssignmentOutput } func (*RoleAssignment) ElementType() reflect.Type { return reflect.TypeOf((**RoleAssignment)(nil)).Elem() } func (i *RoleAssignment) ToRoleAssignmentOutput() RoleAssignmentOutput { return i.ToRoleAssignmentOutputWithContext(context.Background()) } func (i *RoleAssignment) ToRoleAssignmentOutputWithContext(ctx context.Context) RoleAssignmentOutput { return pulumi.ToOutputWithContext(ctx, i).(RoleAssignmentOutput) } // RoleAssignmentArrayInput is an input type that accepts RoleAssignmentArray and RoleAssignmentArrayOutput values. // You can construct a concrete instance of `RoleAssignmentArrayInput` via: // // RoleAssignmentArray{ RoleAssignmentArgs{...} } type RoleAssignmentArrayInput interface { pulumi.Input ToRoleAssignmentArrayOutput() RoleAssignmentArrayOutput ToRoleAssignmentArrayOutputWithContext(context.Context) RoleAssignmentArrayOutput } type RoleAssignmentArray []RoleAssignmentInput func (RoleAssignmentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*RoleAssignment)(nil)).Elem() } func (i RoleAssignmentArray) ToRoleAssignmentArrayOutput() RoleAssignmentArrayOutput { return i.ToRoleAssignmentArrayOutputWithContext(context.Background()) } func (i RoleAssignmentArray) ToRoleAssignmentArrayOutputWithContext(ctx context.Context) RoleAssignmentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(RoleAssignmentArrayOutput) } // RoleAssignmentMapInput is an input type that accepts RoleAssignmentMap and RoleAssignmentMapOutput values. // You can construct a concrete instance of `RoleAssignmentMapInput` via: // // RoleAssignmentMap{ "key": RoleAssignmentArgs{...} } type RoleAssignmentMapInput interface { pulumi.Input ToRoleAssignmentMapOutput() RoleAssignmentMapOutput ToRoleAssignmentMapOutputWithContext(context.Context) RoleAssignmentMapOutput } type RoleAssignmentMap map[string]RoleAssignmentInput func (RoleAssignmentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RoleAssignment)(nil)).Elem() } func (i RoleAssignmentMap) ToRoleAssignmentMapOutput() RoleAssignmentMapOutput { return i.ToRoleAssignmentMapOutputWithContext(context.Background()) } func (i RoleAssignmentMap) ToRoleAssignmentMapOutputWithContext(ctx context.Context) RoleAssignmentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(RoleAssignmentMapOutput) } type RoleAssignmentOutput struct{ *pulumi.OutputState } func (RoleAssignmentOutput) ElementType() reflect.Type { return reflect.TypeOf((**RoleAssignment)(nil)).Elem() } func (o RoleAssignmentOutput) ToRoleAssignmentOutput() RoleAssignmentOutput { return o } func (o RoleAssignmentOutput) ToRoleAssignmentOutputWithContext(ctx context.Context) RoleAssignmentOutput { return o } // The ID of the Principal (User, Group or Service Principal) to assign the Synapse Role Definition to. Changing this forces a new resource to be created. func (o RoleAssignmentOutput) PrincipalId() pulumi.StringOutput { return o.ApplyT(func(v *RoleAssignment) pulumi.StringOutput { return v.PrincipalId }).(pulumi.StringOutput) } // The Type of the Principal. One of `User`, `Group` or `ServicePrincipal`. Changing this forces a new resource to be created. // // > **NOTE:** While `principalType` is optional, it's still recommended to set this value, as some Synapse use-cases may not work correctly if this is not specified. Service Principals for example can't run SQL statements using `Entra ID` authentication if `principalType` is not set to `ServicePrincipal`. func (o RoleAssignmentOutput) PrincipalType() pulumi.StringPtrOutput { return o.ApplyT(func(v *RoleAssignment) pulumi.StringPtrOutput { return v.PrincipalType }).(pulumi.StringPtrOutput) } // The Role Name of the Synapse Built-In Role. Possible values are `Apache Spark Administrator`, `Synapse Administrator`, `Synapse Artifact Publisher`, `Synapse Artifact User`, `Synapse Compute Operator`, `Synapse Contributor`, `Synapse Credential User`, `Synapse Linked Data Manager`, `Synapse Monitoring Operator`, `Synapse SQL Administrator` and `Synapse User`. Changing this forces a new resource to be created. // // > **NOTE:** Currently, the Synapse built-in roles are `Apache Spark Administrator`, `Synapse Administrator`, `Synapse Artifact Publisher`, `Synapse Artifact User`, `Synapse Compute Operator`, `Synapse Contributor`, `Synapse Credential User`, `Synapse Linked Data Manager`, `Synapse Monitoring Operator`, `Synapse SQL Administrator` and `Synapse User`. // // > **NOTE:** Old roles are still supported: `Workspace Admin`, `Apache Spark Admin`, `Sql Admin`. These values will be removed in the next Major Version 3.0. func (o RoleAssignmentOutput) RoleName() pulumi.StringOutput { return o.ApplyT(func(v *RoleAssignment) pulumi.StringOutput { return v.RoleName }).(pulumi.StringOutput) } // The Synapse Spark Pool which the Synapse Role Assignment applies to. Changing this forces a new resource to be created. // // > **NOTE:** A Synapse firewall rule including local IP is needed to allow access. Only one of `synapseWorkspaceId`, `synapseSparkPoolId` must be set. func (o RoleAssignmentOutput) SynapseSparkPoolId() pulumi.StringPtrOutput { return o.ApplyT(func(v *RoleAssignment) pulumi.StringPtrOutput { return v.SynapseSparkPoolId }).(pulumi.StringPtrOutput) } // The Synapse Workspace which the Synapse Role Assignment applies to. Changing this forces a new resource to be created. func (o RoleAssignmentOutput) SynapseWorkspaceId() pulumi.StringPtrOutput { return o.ApplyT(func(v *RoleAssignment) pulumi.StringPtrOutput { return v.SynapseWorkspaceId }).(pulumi.StringPtrOutput) } type RoleAssignmentArrayOutput struct{ *pulumi.OutputState } func (RoleAssignmentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*RoleAssignment)(nil)).Elem() } func (o RoleAssignmentArrayOutput) ToRoleAssignmentArrayOutput() RoleAssignmentArrayOutput { return o } func (o RoleAssignmentArrayOutput) ToRoleAssignmentArrayOutputWithContext(ctx context.Context) RoleAssignmentArrayOutput { return o } func (o RoleAssignmentArrayOutput) Index(i pulumi.IntInput) RoleAssignmentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RoleAssignment { return vs[0].([]*RoleAssignment)[vs[1].(int)] }).(RoleAssignmentOutput) } type RoleAssignmentMapOutput struct{ *pulumi.OutputState } func (RoleAssignmentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RoleAssignment)(nil)).Elem() } func (o RoleAssignmentMapOutput) ToRoleAssignmentMapOutput() RoleAssignmentMapOutput { return o } func (o RoleAssignmentMapOutput) ToRoleAssignmentMapOutputWithContext(ctx context.Context) RoleAssignmentMapOutput { return o } func (o RoleAssignmentMapOutput) MapIndex(k pulumi.StringInput) RoleAssignmentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RoleAssignment { return vs[0].(map[string]*RoleAssignment)[vs[1].(string)] }).(RoleAssignmentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*RoleAssignmentInput)(nil)).Elem(), &RoleAssignment{}) pulumi.RegisterInputType(reflect.TypeOf((*RoleAssignmentArrayInput)(nil)).Elem(), RoleAssignmentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*RoleAssignmentMapInput)(nil)).Elem(), RoleAssignmentMap{}) pulumi.RegisterOutputType(RoleAssignmentOutput{}) pulumi.RegisterOutputType(RoleAssignmentArrayOutput{}) pulumi.RegisterOutputType(RoleAssignmentMapOutput{}) }
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/synapse/workspaceAadAdmin.go
sdk/go/azure/synapse/workspaceAadAdmin.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 synapse 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 Active Directory Administrator setting for a Synapse 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/keyvault" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("StorageV2"), // IsHnsEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("example"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SkuName: pulumi.String("standard"), // PurgeProtectionEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // deployer, err := keyvault.NewAccessPolicy(ctx, "deployer", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Get"), // pulumi.String("Delete"), // pulumi.String("Purge"), // pulumi.String("GetRotationPolicy"), // }, // }) // if err != nil { // return err // } // _, err = keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{ // Name: pulumi.String("workspace-encryption-key"), // KeyVaultId: exampleKeyVault.ID(), // KeyType: pulumi.String("RSA"), // KeySize: pulumi.Int(2048), // KeyOpts: pulumi.StringArray{ // pulumi.String("unwrapKey"), // pulumi.String("wrapKey"), // }, // }, pulumi.DependsOn([]pulumi.Resource{ // deployer, // })) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // Tags: pulumi.StringMap{ // "Env": pulumi.String("production"), // }, // }) // if err != nil { // return err // } // _, err = synapse.NewWorkspaceAadAdmin(ctx, "example", &synapse.WorkspaceAadAdminArgs{ // SynapseWorkspaceId: exampleWorkspace.ID(), // Login: pulumi.String("AzureAD Admin"), // ObjectId: pulumi.String(current.ObjectId), // TenantId: pulumi.String(current.TenantId), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse Workspace Azure AD Administrator can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/workspaceAadAdmin:WorkspaceAadAdmin example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Synapse/workspaces/workspace1/administrators/activeDirectory // ``` type WorkspaceAadAdmin struct { pulumi.CustomResourceState // The login name of the Azure AD Administrator of this Synapse Workspace. Login pulumi.StringOutput `pulumi:"login"` // The object id of the Azure AD Administrator of this Synapse Workspace. ObjectId pulumi.StringOutput `pulumi:"objectId"` // The ID of the Synapse Workspace where the Azure AD Administrator should be configured. SynapseWorkspaceId pulumi.StringOutput `pulumi:"synapseWorkspaceId"` // The tenant id of the Azure AD Administrator of this Synapse Workspace. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewWorkspaceAadAdmin registers a new resource with the given unique name, arguments, and options. func NewWorkspaceAadAdmin(ctx *pulumi.Context, name string, args *WorkspaceAadAdminArgs, opts ...pulumi.ResourceOption) (*WorkspaceAadAdmin, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Login == nil { return nil, errors.New("invalid value for required argument 'Login'") } if args.ObjectId == nil { return nil, errors.New("invalid value for required argument 'ObjectId'") } if args.SynapseWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'SynapseWorkspaceId'") } if args.TenantId == nil { return nil, errors.New("invalid value for required argument 'TenantId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource WorkspaceAadAdmin err := ctx.RegisterResource("azure:synapse/workspaceAadAdmin:WorkspaceAadAdmin", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWorkspaceAadAdmin gets an existing WorkspaceAadAdmin 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 GetWorkspaceAadAdmin(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WorkspaceAadAdminState, opts ...pulumi.ResourceOption) (*WorkspaceAadAdmin, error) { var resource WorkspaceAadAdmin err := ctx.ReadResource("azure:synapse/workspaceAadAdmin:WorkspaceAadAdmin", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering WorkspaceAadAdmin resources. type workspaceAadAdminState struct { // The login name of the Azure AD Administrator of this Synapse Workspace. Login *string `pulumi:"login"` // The object id of the Azure AD Administrator of this Synapse Workspace. ObjectId *string `pulumi:"objectId"` // The ID of the Synapse Workspace where the Azure AD Administrator should be configured. SynapseWorkspaceId *string `pulumi:"synapseWorkspaceId"` // The tenant id of the Azure AD Administrator of this Synapse Workspace. TenantId *string `pulumi:"tenantId"` } type WorkspaceAadAdminState struct { // The login name of the Azure AD Administrator of this Synapse Workspace. Login pulumi.StringPtrInput // The object id of the Azure AD Administrator of this Synapse Workspace. ObjectId pulumi.StringPtrInput // The ID of the Synapse Workspace where the Azure AD Administrator should be configured. SynapseWorkspaceId pulumi.StringPtrInput // The tenant id of the Azure AD Administrator of this Synapse Workspace. TenantId pulumi.StringPtrInput } func (WorkspaceAadAdminState) ElementType() reflect.Type { return reflect.TypeOf((*workspaceAadAdminState)(nil)).Elem() } type workspaceAadAdminArgs struct { // The login name of the Azure AD Administrator of this Synapse Workspace. Login string `pulumi:"login"` // The object id of the Azure AD Administrator of this Synapse Workspace. ObjectId string `pulumi:"objectId"` // The ID of the Synapse Workspace where the Azure AD Administrator should be configured. SynapseWorkspaceId string `pulumi:"synapseWorkspaceId"` // The tenant id of the Azure AD Administrator of this Synapse Workspace. TenantId string `pulumi:"tenantId"` } // The set of arguments for constructing a WorkspaceAadAdmin resource. type WorkspaceAadAdminArgs struct { // The login name of the Azure AD Administrator of this Synapse Workspace. Login pulumi.StringInput // The object id of the Azure AD Administrator of this Synapse Workspace. ObjectId pulumi.StringInput // The ID of the Synapse Workspace where the Azure AD Administrator should be configured. SynapseWorkspaceId pulumi.StringInput // The tenant id of the Azure AD Administrator of this Synapse Workspace. TenantId pulumi.StringInput } func (WorkspaceAadAdminArgs) ElementType() reflect.Type { return reflect.TypeOf((*workspaceAadAdminArgs)(nil)).Elem() } type WorkspaceAadAdminInput interface { pulumi.Input ToWorkspaceAadAdminOutput() WorkspaceAadAdminOutput ToWorkspaceAadAdminOutputWithContext(ctx context.Context) WorkspaceAadAdminOutput } func (*WorkspaceAadAdmin) ElementType() reflect.Type { return reflect.TypeOf((**WorkspaceAadAdmin)(nil)).Elem() } func (i *WorkspaceAadAdmin) ToWorkspaceAadAdminOutput() WorkspaceAadAdminOutput { return i.ToWorkspaceAadAdminOutputWithContext(context.Background()) } func (i *WorkspaceAadAdmin) ToWorkspaceAadAdminOutputWithContext(ctx context.Context) WorkspaceAadAdminOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceAadAdminOutput) } // WorkspaceAadAdminArrayInput is an input type that accepts WorkspaceAadAdminArray and WorkspaceAadAdminArrayOutput values. // You can construct a concrete instance of `WorkspaceAadAdminArrayInput` via: // // WorkspaceAadAdminArray{ WorkspaceAadAdminArgs{...} } type WorkspaceAadAdminArrayInput interface { pulumi.Input ToWorkspaceAadAdminArrayOutput() WorkspaceAadAdminArrayOutput ToWorkspaceAadAdminArrayOutputWithContext(context.Context) WorkspaceAadAdminArrayOutput } type WorkspaceAadAdminArray []WorkspaceAadAdminInput func (WorkspaceAadAdminArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*WorkspaceAadAdmin)(nil)).Elem() } func (i WorkspaceAadAdminArray) ToWorkspaceAadAdminArrayOutput() WorkspaceAadAdminArrayOutput { return i.ToWorkspaceAadAdminArrayOutputWithContext(context.Background()) } func (i WorkspaceAadAdminArray) ToWorkspaceAadAdminArrayOutputWithContext(ctx context.Context) WorkspaceAadAdminArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceAadAdminArrayOutput) } // WorkspaceAadAdminMapInput is an input type that accepts WorkspaceAadAdminMap and WorkspaceAadAdminMapOutput values. // You can construct a concrete instance of `WorkspaceAadAdminMapInput` via: // // WorkspaceAadAdminMap{ "key": WorkspaceAadAdminArgs{...} } type WorkspaceAadAdminMapInput interface { pulumi.Input ToWorkspaceAadAdminMapOutput() WorkspaceAadAdminMapOutput ToWorkspaceAadAdminMapOutputWithContext(context.Context) WorkspaceAadAdminMapOutput } type WorkspaceAadAdminMap map[string]WorkspaceAadAdminInput func (WorkspaceAadAdminMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WorkspaceAadAdmin)(nil)).Elem() } func (i WorkspaceAadAdminMap) ToWorkspaceAadAdminMapOutput() WorkspaceAadAdminMapOutput { return i.ToWorkspaceAadAdminMapOutputWithContext(context.Background()) } func (i WorkspaceAadAdminMap) ToWorkspaceAadAdminMapOutputWithContext(ctx context.Context) WorkspaceAadAdminMapOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceAadAdminMapOutput) } type WorkspaceAadAdminOutput struct{ *pulumi.OutputState } func (WorkspaceAadAdminOutput) ElementType() reflect.Type { return reflect.TypeOf((**WorkspaceAadAdmin)(nil)).Elem() } func (o WorkspaceAadAdminOutput) ToWorkspaceAadAdminOutput() WorkspaceAadAdminOutput { return o } func (o WorkspaceAadAdminOutput) ToWorkspaceAadAdminOutputWithContext(ctx context.Context) WorkspaceAadAdminOutput { return o } // The login name of the Azure AD Administrator of this Synapse Workspace. func (o WorkspaceAadAdminOutput) Login() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceAadAdmin) pulumi.StringOutput { return v.Login }).(pulumi.StringOutput) } // The object id of the Azure AD Administrator of this Synapse Workspace. func (o WorkspaceAadAdminOutput) ObjectId() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceAadAdmin) pulumi.StringOutput { return v.ObjectId }).(pulumi.StringOutput) } // The ID of the Synapse Workspace where the Azure AD Administrator should be configured. func (o WorkspaceAadAdminOutput) SynapseWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceAadAdmin) pulumi.StringOutput { return v.SynapseWorkspaceId }).(pulumi.StringOutput) } // The tenant id of the Azure AD Administrator of this Synapse Workspace. func (o WorkspaceAadAdminOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceAadAdmin) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type WorkspaceAadAdminArrayOutput struct{ *pulumi.OutputState } func (WorkspaceAadAdminArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*WorkspaceAadAdmin)(nil)).Elem() } func (o WorkspaceAadAdminArrayOutput) ToWorkspaceAadAdminArrayOutput() WorkspaceAadAdminArrayOutput { return o } func (o WorkspaceAadAdminArrayOutput) ToWorkspaceAadAdminArrayOutputWithContext(ctx context.Context) WorkspaceAadAdminArrayOutput { return o } func (o WorkspaceAadAdminArrayOutput) Index(i pulumi.IntInput) WorkspaceAadAdminOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkspaceAadAdmin { return vs[0].([]*WorkspaceAadAdmin)[vs[1].(int)] }).(WorkspaceAadAdminOutput) } type WorkspaceAadAdminMapOutput struct{ *pulumi.OutputState } func (WorkspaceAadAdminMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WorkspaceAadAdmin)(nil)).Elem() } func (o WorkspaceAadAdminMapOutput) ToWorkspaceAadAdminMapOutput() WorkspaceAadAdminMapOutput { return o } func (o WorkspaceAadAdminMapOutput) ToWorkspaceAadAdminMapOutputWithContext(ctx context.Context) WorkspaceAadAdminMapOutput { return o } func (o WorkspaceAadAdminMapOutput) MapIndex(k pulumi.StringInput) WorkspaceAadAdminOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkspaceAadAdmin { return vs[0].(map[string]*WorkspaceAadAdmin)[vs[1].(string)] }).(WorkspaceAadAdminOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceAadAdminInput)(nil)).Elem(), &WorkspaceAadAdmin{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceAadAdminArrayInput)(nil)).Elem(), WorkspaceAadAdminArray{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceAadAdminMapInput)(nil)).Elem(), WorkspaceAadAdminMap{}) pulumi.RegisterOutputType(WorkspaceAadAdminOutput{}) pulumi.RegisterOutputType(WorkspaceAadAdminArrayOutput{}) pulumi.RegisterOutputType(WorkspaceAadAdminMapOutput{}) }
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/synapse/sqlPoolExtendedAuditingPolicy.go
sdk/go/azure/synapse/sqlPoolExtendedAuditingPolicy.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Synapse SQL Pool Extended Auditing Policy. // // ## 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("BlobStorage"), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // exampleSqlPool, err := synapse.NewSqlPool(ctx, "example", &synapse.SqlPoolArgs{ // Name: pulumi.String("examplesqlpool"), // SynapseWorkspaceId: exampleWorkspace.ID(), // SkuName: pulumi.String("DW100c"), // CreateMode: pulumi.String("Default"), // }) // if err != nil { // return err // } // auditLogs, err := storage.NewAccount(ctx, "audit_logs", &storage.AccountArgs{ // Name: pulumi.String("examplesa"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // _, err = synapse.NewSqlPoolExtendedAuditingPolicy(ctx, "example", &synapse.SqlPoolExtendedAuditingPolicyArgs{ // SqlPoolId: exampleSqlPool.ID(), // StorageEndpoint: auditLogs.PrimaryBlobEndpoint, // StorageAccountAccessKey: auditLogs.PrimaryAccessKey, // StorageAccountAccessKeyIsSecondary: pulumi.Bool(false), // RetentionInDays: pulumi.Int(6), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse SQL Pool Extended Auditing Policys can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/sqlPoolExtendedAuditingPolicy:SqlPoolExtendedAuditingPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Synapse/workspaces/workspace1/sqlPools/sqlPool1/extendedAuditingSettings/default // ``` type SqlPoolExtendedAuditingPolicy struct { pulumi.CustomResourceState // Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its master database audit events to Azure Monitor. Defaults to `true`. LogMonitoringEnabled pulumi.BoolPtrOutput `pulumi:"logMonitoringEnabled"` // The number of days to retain logs for in the storage account. Defaults to `0`. RetentionInDays pulumi.IntPtrOutput `pulumi:"retentionInDays"` // The ID of the Synapse SQL pool to set the extended auditing policy. Changing this forces a new resource to be created. SqlPoolId pulumi.StringOutput `pulumi:"sqlPoolId"` // The access key to use for the auditing storage account. StorageAccountAccessKey pulumi.StringPtrOutput `pulumi:"storageAccountAccessKey"` // Is `storageAccountAccessKey` value the storage's secondary key? StorageAccountAccessKeyIsSecondary pulumi.BoolPtrOutput `pulumi:"storageAccountAccessKeyIsSecondary"` // The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs. StorageEndpoint pulumi.StringPtrOutput `pulumi:"storageEndpoint"` } // NewSqlPoolExtendedAuditingPolicy registers a new resource with the given unique name, arguments, and options. func NewSqlPoolExtendedAuditingPolicy(ctx *pulumi.Context, name string, args *SqlPoolExtendedAuditingPolicyArgs, opts ...pulumi.ResourceOption) (*SqlPoolExtendedAuditingPolicy, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.SqlPoolId == nil { return nil, errors.New("invalid value for required argument 'SqlPoolId'") } if args.StorageAccountAccessKey != nil { args.StorageAccountAccessKey = pulumi.ToSecret(args.StorageAccountAccessKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "storageAccountAccessKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource SqlPoolExtendedAuditingPolicy err := ctx.RegisterResource("azure:synapse/sqlPoolExtendedAuditingPolicy:SqlPoolExtendedAuditingPolicy", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSqlPoolExtendedAuditingPolicy gets an existing SqlPoolExtendedAuditingPolicy 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 GetSqlPoolExtendedAuditingPolicy(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SqlPoolExtendedAuditingPolicyState, opts ...pulumi.ResourceOption) (*SqlPoolExtendedAuditingPolicy, error) { var resource SqlPoolExtendedAuditingPolicy err := ctx.ReadResource("azure:synapse/sqlPoolExtendedAuditingPolicy:SqlPoolExtendedAuditingPolicy", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SqlPoolExtendedAuditingPolicy resources. type sqlPoolExtendedAuditingPolicyState struct { // Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its master database audit events to Azure Monitor. Defaults to `true`. LogMonitoringEnabled *bool `pulumi:"logMonitoringEnabled"` // The number of days to retain logs for in the storage account. Defaults to `0`. RetentionInDays *int `pulumi:"retentionInDays"` // The ID of the Synapse SQL pool to set the extended auditing policy. Changing this forces a new resource to be created. SqlPoolId *string `pulumi:"sqlPoolId"` // The access key to use for the auditing storage account. StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"` // Is `storageAccountAccessKey` value the storage's secondary key? StorageAccountAccessKeyIsSecondary *bool `pulumi:"storageAccountAccessKeyIsSecondary"` // The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs. StorageEndpoint *string `pulumi:"storageEndpoint"` } type SqlPoolExtendedAuditingPolicyState struct { // Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its master database audit events to Azure Monitor. Defaults to `true`. LogMonitoringEnabled pulumi.BoolPtrInput // The number of days to retain logs for in the storage account. Defaults to `0`. RetentionInDays pulumi.IntPtrInput // The ID of the Synapse SQL pool to set the extended auditing policy. Changing this forces a new resource to be created. SqlPoolId pulumi.StringPtrInput // The access key to use for the auditing storage account. StorageAccountAccessKey pulumi.StringPtrInput // Is `storageAccountAccessKey` value the storage's secondary key? StorageAccountAccessKeyIsSecondary pulumi.BoolPtrInput // The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs. StorageEndpoint pulumi.StringPtrInput } func (SqlPoolExtendedAuditingPolicyState) ElementType() reflect.Type { return reflect.TypeOf((*sqlPoolExtendedAuditingPolicyState)(nil)).Elem() } type sqlPoolExtendedAuditingPolicyArgs struct { // Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its master database audit events to Azure Monitor. Defaults to `true`. LogMonitoringEnabled *bool `pulumi:"logMonitoringEnabled"` // The number of days to retain logs for in the storage account. Defaults to `0`. RetentionInDays *int `pulumi:"retentionInDays"` // The ID of the Synapse SQL pool to set the extended auditing policy. Changing this forces a new resource to be created. SqlPoolId string `pulumi:"sqlPoolId"` // The access key to use for the auditing storage account. StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"` // Is `storageAccountAccessKey` value the storage's secondary key? StorageAccountAccessKeyIsSecondary *bool `pulumi:"storageAccountAccessKeyIsSecondary"` // The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs. StorageEndpoint *string `pulumi:"storageEndpoint"` } // The set of arguments for constructing a SqlPoolExtendedAuditingPolicy resource. type SqlPoolExtendedAuditingPolicyArgs struct { // Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its master database audit events to Azure Monitor. Defaults to `true`. LogMonitoringEnabled pulumi.BoolPtrInput // The number of days to retain logs for in the storage account. Defaults to `0`. RetentionInDays pulumi.IntPtrInput // The ID of the Synapse SQL pool to set the extended auditing policy. Changing this forces a new resource to be created. SqlPoolId pulumi.StringInput // The access key to use for the auditing storage account. StorageAccountAccessKey pulumi.StringPtrInput // Is `storageAccountAccessKey` value the storage's secondary key? StorageAccountAccessKeyIsSecondary pulumi.BoolPtrInput // The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs. StorageEndpoint pulumi.StringPtrInput } func (SqlPoolExtendedAuditingPolicyArgs) ElementType() reflect.Type { return reflect.TypeOf((*sqlPoolExtendedAuditingPolicyArgs)(nil)).Elem() } type SqlPoolExtendedAuditingPolicyInput interface { pulumi.Input ToSqlPoolExtendedAuditingPolicyOutput() SqlPoolExtendedAuditingPolicyOutput ToSqlPoolExtendedAuditingPolicyOutputWithContext(ctx context.Context) SqlPoolExtendedAuditingPolicyOutput } func (*SqlPoolExtendedAuditingPolicy) ElementType() reflect.Type { return reflect.TypeOf((**SqlPoolExtendedAuditingPolicy)(nil)).Elem() } func (i *SqlPoolExtendedAuditingPolicy) ToSqlPoolExtendedAuditingPolicyOutput() SqlPoolExtendedAuditingPolicyOutput { return i.ToSqlPoolExtendedAuditingPolicyOutputWithContext(context.Background()) } func (i *SqlPoolExtendedAuditingPolicy) ToSqlPoolExtendedAuditingPolicyOutputWithContext(ctx context.Context) SqlPoolExtendedAuditingPolicyOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolExtendedAuditingPolicyOutput) } // SqlPoolExtendedAuditingPolicyArrayInput is an input type that accepts SqlPoolExtendedAuditingPolicyArray and SqlPoolExtendedAuditingPolicyArrayOutput values. // You can construct a concrete instance of `SqlPoolExtendedAuditingPolicyArrayInput` via: // // SqlPoolExtendedAuditingPolicyArray{ SqlPoolExtendedAuditingPolicyArgs{...} } type SqlPoolExtendedAuditingPolicyArrayInput interface { pulumi.Input ToSqlPoolExtendedAuditingPolicyArrayOutput() SqlPoolExtendedAuditingPolicyArrayOutput ToSqlPoolExtendedAuditingPolicyArrayOutputWithContext(context.Context) SqlPoolExtendedAuditingPolicyArrayOutput } type SqlPoolExtendedAuditingPolicyArray []SqlPoolExtendedAuditingPolicyInput func (SqlPoolExtendedAuditingPolicyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SqlPoolExtendedAuditingPolicy)(nil)).Elem() } func (i SqlPoolExtendedAuditingPolicyArray) ToSqlPoolExtendedAuditingPolicyArrayOutput() SqlPoolExtendedAuditingPolicyArrayOutput { return i.ToSqlPoolExtendedAuditingPolicyArrayOutputWithContext(context.Background()) } func (i SqlPoolExtendedAuditingPolicyArray) ToSqlPoolExtendedAuditingPolicyArrayOutputWithContext(ctx context.Context) SqlPoolExtendedAuditingPolicyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolExtendedAuditingPolicyArrayOutput) } // SqlPoolExtendedAuditingPolicyMapInput is an input type that accepts SqlPoolExtendedAuditingPolicyMap and SqlPoolExtendedAuditingPolicyMapOutput values. // You can construct a concrete instance of `SqlPoolExtendedAuditingPolicyMapInput` via: // // SqlPoolExtendedAuditingPolicyMap{ "key": SqlPoolExtendedAuditingPolicyArgs{...} } type SqlPoolExtendedAuditingPolicyMapInput interface { pulumi.Input ToSqlPoolExtendedAuditingPolicyMapOutput() SqlPoolExtendedAuditingPolicyMapOutput ToSqlPoolExtendedAuditingPolicyMapOutputWithContext(context.Context) SqlPoolExtendedAuditingPolicyMapOutput } type SqlPoolExtendedAuditingPolicyMap map[string]SqlPoolExtendedAuditingPolicyInput func (SqlPoolExtendedAuditingPolicyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SqlPoolExtendedAuditingPolicy)(nil)).Elem() } func (i SqlPoolExtendedAuditingPolicyMap) ToSqlPoolExtendedAuditingPolicyMapOutput() SqlPoolExtendedAuditingPolicyMapOutput { return i.ToSqlPoolExtendedAuditingPolicyMapOutputWithContext(context.Background()) } func (i SqlPoolExtendedAuditingPolicyMap) ToSqlPoolExtendedAuditingPolicyMapOutputWithContext(ctx context.Context) SqlPoolExtendedAuditingPolicyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolExtendedAuditingPolicyMapOutput) } type SqlPoolExtendedAuditingPolicyOutput struct{ *pulumi.OutputState } func (SqlPoolExtendedAuditingPolicyOutput) ElementType() reflect.Type { return reflect.TypeOf((**SqlPoolExtendedAuditingPolicy)(nil)).Elem() } func (o SqlPoolExtendedAuditingPolicyOutput) ToSqlPoolExtendedAuditingPolicyOutput() SqlPoolExtendedAuditingPolicyOutput { return o } func (o SqlPoolExtendedAuditingPolicyOutput) ToSqlPoolExtendedAuditingPolicyOutputWithContext(ctx context.Context) SqlPoolExtendedAuditingPolicyOutput { return o } // Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its master database audit events to Azure Monitor. Defaults to `true`. func (o SqlPoolExtendedAuditingPolicyOutput) LogMonitoringEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *SqlPoolExtendedAuditingPolicy) pulumi.BoolPtrOutput { return v.LogMonitoringEnabled }).(pulumi.BoolPtrOutput) } // The number of days to retain logs for in the storage account. Defaults to `0`. func (o SqlPoolExtendedAuditingPolicyOutput) RetentionInDays() pulumi.IntPtrOutput { return o.ApplyT(func(v *SqlPoolExtendedAuditingPolicy) pulumi.IntPtrOutput { return v.RetentionInDays }).(pulumi.IntPtrOutput) } // The ID of the Synapse SQL pool to set the extended auditing policy. Changing this forces a new resource to be created. func (o SqlPoolExtendedAuditingPolicyOutput) SqlPoolId() pulumi.StringOutput { return o.ApplyT(func(v *SqlPoolExtendedAuditingPolicy) pulumi.StringOutput { return v.SqlPoolId }).(pulumi.StringOutput) } // The access key to use for the auditing storage account. func (o SqlPoolExtendedAuditingPolicyOutput) StorageAccountAccessKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *SqlPoolExtendedAuditingPolicy) pulumi.StringPtrOutput { return v.StorageAccountAccessKey }).(pulumi.StringPtrOutput) } // Is `storageAccountAccessKey` value the storage's secondary key? func (o SqlPoolExtendedAuditingPolicyOutput) StorageAccountAccessKeyIsSecondary() pulumi.BoolPtrOutput { return o.ApplyT(func(v *SqlPoolExtendedAuditingPolicy) pulumi.BoolPtrOutput { return v.StorageAccountAccessKeyIsSecondary }).(pulumi.BoolPtrOutput) } // The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs. func (o SqlPoolExtendedAuditingPolicyOutput) StorageEndpoint() pulumi.StringPtrOutput { return o.ApplyT(func(v *SqlPoolExtendedAuditingPolicy) pulumi.StringPtrOutput { return v.StorageEndpoint }).(pulumi.StringPtrOutput) } type SqlPoolExtendedAuditingPolicyArrayOutput struct{ *pulumi.OutputState } func (SqlPoolExtendedAuditingPolicyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SqlPoolExtendedAuditingPolicy)(nil)).Elem() } func (o SqlPoolExtendedAuditingPolicyArrayOutput) ToSqlPoolExtendedAuditingPolicyArrayOutput() SqlPoolExtendedAuditingPolicyArrayOutput { return o } func (o SqlPoolExtendedAuditingPolicyArrayOutput) ToSqlPoolExtendedAuditingPolicyArrayOutputWithContext(ctx context.Context) SqlPoolExtendedAuditingPolicyArrayOutput { return o } func (o SqlPoolExtendedAuditingPolicyArrayOutput) Index(i pulumi.IntInput) SqlPoolExtendedAuditingPolicyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SqlPoolExtendedAuditingPolicy { return vs[0].([]*SqlPoolExtendedAuditingPolicy)[vs[1].(int)] }).(SqlPoolExtendedAuditingPolicyOutput) } type SqlPoolExtendedAuditingPolicyMapOutput struct{ *pulumi.OutputState } func (SqlPoolExtendedAuditingPolicyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SqlPoolExtendedAuditingPolicy)(nil)).Elem() } func (o SqlPoolExtendedAuditingPolicyMapOutput) ToSqlPoolExtendedAuditingPolicyMapOutput() SqlPoolExtendedAuditingPolicyMapOutput { return o } func (o SqlPoolExtendedAuditingPolicyMapOutput) ToSqlPoolExtendedAuditingPolicyMapOutputWithContext(ctx context.Context) SqlPoolExtendedAuditingPolicyMapOutput { return o } func (o SqlPoolExtendedAuditingPolicyMapOutput) MapIndex(k pulumi.StringInput) SqlPoolExtendedAuditingPolicyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SqlPoolExtendedAuditingPolicy { return vs[0].(map[string]*SqlPoolExtendedAuditingPolicy)[vs[1].(string)] }).(SqlPoolExtendedAuditingPolicyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolExtendedAuditingPolicyInput)(nil)).Elem(), &SqlPoolExtendedAuditingPolicy{}) pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolExtendedAuditingPolicyArrayInput)(nil)).Elem(), SqlPoolExtendedAuditingPolicyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolExtendedAuditingPolicyMapInput)(nil)).Elem(), SqlPoolExtendedAuditingPolicyMap{}) pulumi.RegisterOutputType(SqlPoolExtendedAuditingPolicyOutput{}) pulumi.RegisterOutputType(SqlPoolExtendedAuditingPolicyArrayOutput{}) pulumi.RegisterOutputType(SqlPoolExtendedAuditingPolicyMapOutput{}) }
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/synapse/workspace.go
sdk/go/azure/synapse/workspace.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Synapse 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("StorageV2"), // IsHnsEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // _, err = synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // Tags: pulumi.StringMap{ // "Env": pulumi.String("production"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Creating A Workspace With Customer Managed Key And Azure AD Admin // // ```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-azure/sdk/v6/go/azure/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("StorageV2"), // IsHnsEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("example"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SkuName: pulumi.String("standard"), // PurgeProtectionEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // deployer, err := keyvault.NewAccessPolicy(ctx, "deployer", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Get"), // pulumi.String("Delete"), // pulumi.String("Purge"), // pulumi.String("GetRotationPolicy"), // }, // }) // if err != nil { // return err // } // exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{ // Name: pulumi.String("workspaceencryptionkey"), // KeyVaultId: exampleKeyVault.ID(), // KeyType: pulumi.String("RSA"), // KeySize: pulumi.Int(2048), // KeyOpts: pulumi.StringArray{ // pulumi.String("unwrapKey"), // pulumi.String("wrapKey"), // }, // }, pulumi.DependsOn([]pulumi.Resource{ // deployer, // })) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // CustomerManagedKey: &synapse.WorkspaceCustomerManagedKeyArgs{ // KeyVersionlessId: exampleKey.VersionlessId, // KeyName: pulumi.String("enckey"), // }, // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // Tags: pulumi.StringMap{ // "Env": pulumi.String("production"), // }, // }) // if err != nil { // return err // } // workspacePolicy, err := keyvault.NewAccessPolicy(ctx, "workspace_policy", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(exampleWorkspace.Identity.ApplyT(func(identity synapse.WorkspaceIdentity) (*string, error) { // return &identity.TenantId, nil // }).(pulumi.StringPtrOutput)), // ObjectId: pulumi.String(exampleWorkspace.Identity.ApplyT(func(identity synapse.WorkspaceIdentity) (*string, error) { // return &identity.PrincipalId, nil // }).(pulumi.StringPtrOutput)), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Get"), // pulumi.String("WrapKey"), // pulumi.String("UnwrapKey"), // }, // }) // if err != nil { // return err // } // exampleWorkspaceKey, err := synapse.NewWorkspaceKey(ctx, "example", &synapse.WorkspaceKeyArgs{ // CustomerManagedKeyVersionlessId: exampleKey.VersionlessId, // SynapseWorkspaceId: exampleWorkspace.ID(), // Active: pulumi.Bool(true), // CustomerManagedKeyName: pulumi.String("enckey"), // }, pulumi.DependsOn([]pulumi.Resource{ // workspacePolicy, // })) // if err != nil { // return err // } // _, err = synapse.NewWorkspaceAadAdmin(ctx, "example", &synapse.WorkspaceAadAdminArgs{ // SynapseWorkspaceId: exampleWorkspace.ID(), // Login: pulumi.String("AzureAD Admin"), // ObjectId: pulumi.String("00000000-0000-0000-0000-000000000000"), // TenantId: pulumi.String("00000000-0000-0000-0000-000000000000"), // }, pulumi.DependsOn([]pulumi.Resource{ // exampleWorkspaceKey, // })) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse Workspace can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/workspace:Workspace example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Synapse/workspaces/workspace1 // ``` type Workspace struct { pulumi.CustomResourceState // An `azureDevopsRepo` block as defined below. AzureDevopsRepo WorkspaceAzureDevopsRepoPtrOutput `pulumi:"azureDevopsRepo"` // Is Azure Active Directory Authentication the only way to authenticate with resources inside this synapse Workspace. Defaults to `false`. AzureadAuthenticationOnly pulumi.BoolPtrOutput `pulumi:"azureadAuthenticationOnly"` // Subnet ID used for computes in workspace Changing this forces a new resource to be created. ComputeSubnetId pulumi.StringPtrOutput `pulumi:"computeSubnetId"` // A map of Connectivity endpoints for this Synapse Workspace. Possible key values are `dev`, `sql`, `sqlOnDemand`, and `web`. ConnectivityEndpoints pulumi.StringMapOutput `pulumi:"connectivityEndpoints"` // A `customerManagedKey` block as defined below. CustomerManagedKey WorkspaceCustomerManagedKeyPtrOutput `pulumi:"customerManagedKey"` // Is data exfiltration protection enabled in this workspace? If set to `true`, `managedVirtualNetworkEnabled` must also be set to `true`. Changing this forces a new resource to be created. DataExfiltrationProtectionEnabled pulumi.BoolPtrOutput `pulumi:"dataExfiltrationProtectionEnabled"` // A `githubRepo` block as defined below. GithubRepo WorkspaceGithubRepoPtrOutput `pulumi:"githubRepo"` // An `identity` block as defined below. Identity WorkspaceIdentityPtrOutput `pulumi:"identity"` // Allowed AAD Tenant Ids For Linking. LinkingAllowedForAadTenantIds pulumi.StringArrayOutput `pulumi:"linkingAllowedForAadTenantIds"` // Specifies the Azure Region where the synapse Workspace should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Workspace managed resource group. Changing this forces a new resource to be created. ManagedResourceGroupName pulumi.StringOutput `pulumi:"managedResourceGroupName"` // Is Virtual Network enabled for all computes in this workspace? Changing this forces a new resource to be created. ManagedVirtualNetworkEnabled pulumi.BoolPtrOutput `pulumi:"managedVirtualNetworkEnabled"` // Specifies the name which should be used for this synapse Workspace. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Whether public network access is allowed for the Cognitive Account. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"` // The ID of purview account. PurviewId pulumi.StringPtrOutput `pulumi:"purviewId"` // Specifies the name of the Resource Group where the synapse Workspace should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Specifies The login name of the SQL administrator. Changing this forces a new resource to be created. If this is not provided `customerManagedKey` must be provided. SqlAdministratorLogin pulumi.StringPtrOutput `pulumi:"sqlAdministratorLogin"` // The Password associated with the `sqlAdministratorLogin` for the SQL administrator. If this is not provided `customerManagedKey` must be provided. SqlAdministratorLoginPassword pulumi.StringPtrOutput `pulumi:"sqlAdministratorLoginPassword"` // Are pipelines (running as workspace's system assigned identity) allowed to access SQL pools? SqlIdentityControlEnabled pulumi.BoolPtrOutput `pulumi:"sqlIdentityControlEnabled"` // Specifies the ID of storage data lake gen2 filesystem resource. Changing this forces a new resource to be created. StorageDataLakeGen2FilesystemId pulumi.StringOutput `pulumi:"storageDataLakeGen2FilesystemId"` // A mapping of tags which should be assigned to the Synapse Workspace. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewWorkspace registers a new resource with the given unique name, arguments, and options. func NewWorkspace(ctx *pulumi.Context, name string, args *WorkspaceArgs, opts ...pulumi.ResourceOption) (*Workspace, 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.StorageDataLakeGen2FilesystemId == nil { return nil, errors.New("invalid value for required argument 'StorageDataLakeGen2FilesystemId'") } if args.SqlAdministratorLoginPassword != nil { args.SqlAdministratorLoginPassword = pulumi.ToSecret(args.SqlAdministratorLoginPassword).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "sqlAdministratorLoginPassword", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource Workspace err := ctx.RegisterResource("azure:synapse/workspace:Workspace", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWorkspace gets an existing Workspace 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 GetWorkspace(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WorkspaceState, opts ...pulumi.ResourceOption) (*Workspace, error) { var resource Workspace err := ctx.ReadResource("azure:synapse/workspace:Workspace", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Workspace resources. type workspaceState struct { // An `azureDevopsRepo` block as defined below. AzureDevopsRepo *WorkspaceAzureDevopsRepo `pulumi:"azureDevopsRepo"` // Is Azure Active Directory Authentication the only way to authenticate with resources inside this synapse Workspace. Defaults to `false`. AzureadAuthenticationOnly *bool `pulumi:"azureadAuthenticationOnly"` // Subnet ID used for computes in workspace Changing this forces a new resource to be created. ComputeSubnetId *string `pulumi:"computeSubnetId"` // A map of Connectivity endpoints for this Synapse Workspace. Possible key values are `dev`, `sql`, `sqlOnDemand`, and `web`. ConnectivityEndpoints map[string]string `pulumi:"connectivityEndpoints"` // A `customerManagedKey` block as defined below. CustomerManagedKey *WorkspaceCustomerManagedKey `pulumi:"customerManagedKey"` // Is data exfiltration protection enabled in this workspace? If set to `true`, `managedVirtualNetworkEnabled` must also be set to `true`. Changing this forces a new resource to be created. DataExfiltrationProtectionEnabled *bool `pulumi:"dataExfiltrationProtectionEnabled"` // A `githubRepo` block as defined below. GithubRepo *WorkspaceGithubRepo `pulumi:"githubRepo"` // An `identity` block as defined below. Identity *WorkspaceIdentity `pulumi:"identity"` // Allowed AAD Tenant Ids For Linking. LinkingAllowedForAadTenantIds []string `pulumi:"linkingAllowedForAadTenantIds"` // Specifies the Azure Region where the synapse Workspace should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Workspace managed resource group. Changing this forces a new resource to be created. ManagedResourceGroupName *string `pulumi:"managedResourceGroupName"` // Is Virtual Network enabled for all computes in this workspace? Changing this forces a new resource to be created. ManagedVirtualNetworkEnabled *bool `pulumi:"managedVirtualNetworkEnabled"` // Specifies the name which should be used for this synapse Workspace. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Whether public network access is allowed for the Cognitive Account. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // The ID of purview account. PurviewId *string `pulumi:"purviewId"` // Specifies the name of the Resource Group where the synapse Workspace should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Specifies The login name of the SQL administrator. Changing this forces a new resource to be created. If this is not provided `customerManagedKey` must be provided. SqlAdministratorLogin *string `pulumi:"sqlAdministratorLogin"` // The Password associated with the `sqlAdministratorLogin` for the SQL administrator. If this is not provided `customerManagedKey` must be provided. SqlAdministratorLoginPassword *string `pulumi:"sqlAdministratorLoginPassword"` // Are pipelines (running as workspace's system assigned identity) allowed to access SQL pools? SqlIdentityControlEnabled *bool `pulumi:"sqlIdentityControlEnabled"` // Specifies the ID of storage data lake gen2 filesystem resource. Changing this forces a new resource to be created. StorageDataLakeGen2FilesystemId *string `pulumi:"storageDataLakeGen2FilesystemId"` // A mapping of tags which should be assigned to the Synapse Workspace. Tags map[string]string `pulumi:"tags"` } type WorkspaceState struct { // An `azureDevopsRepo` block as defined below. AzureDevopsRepo WorkspaceAzureDevopsRepoPtrInput // Is Azure Active Directory Authentication the only way to authenticate with resources inside this synapse Workspace. Defaults to `false`. AzureadAuthenticationOnly pulumi.BoolPtrInput // Subnet ID used for computes in workspace Changing this forces a new resource to be created. ComputeSubnetId pulumi.StringPtrInput // A map of Connectivity endpoints for this Synapse Workspace. Possible key values are `dev`, `sql`, `sqlOnDemand`, and `web`. ConnectivityEndpoints pulumi.StringMapInput // A `customerManagedKey` block as defined below. CustomerManagedKey WorkspaceCustomerManagedKeyPtrInput // Is data exfiltration protection enabled in this workspace? If set to `true`, `managedVirtualNetworkEnabled` must also be set to `true`. Changing this forces a new resource to be created. DataExfiltrationProtectionEnabled pulumi.BoolPtrInput // A `githubRepo` block as defined below. GithubRepo WorkspaceGithubRepoPtrInput // An `identity` block as defined below. Identity WorkspaceIdentityPtrInput // Allowed AAD Tenant Ids For Linking. LinkingAllowedForAadTenantIds pulumi.StringArrayInput // Specifies the Azure Region where the synapse Workspace should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Workspace managed resource group. Changing this forces a new resource to be created. ManagedResourceGroupName pulumi.StringPtrInput // Is Virtual Network enabled for all computes in this workspace? Changing this forces a new resource to be created. ManagedVirtualNetworkEnabled pulumi.BoolPtrInput // Specifies the name which should be used for this synapse Workspace. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Whether public network access is allowed for the Cognitive Account. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // The ID of purview account. PurviewId pulumi.StringPtrInput // Specifies the name of the Resource Group where the synapse Workspace should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Specifies The login name of the SQL administrator. Changing this forces a new resource to be created. If this is not provided `customerManagedKey` must be provided. SqlAdministratorLogin pulumi.StringPtrInput // The Password associated with the `sqlAdministratorLogin` for the SQL administrator. If this is not provided `customerManagedKey` must be provided. SqlAdministratorLoginPassword pulumi.StringPtrInput // Are pipelines (running as workspace's system assigned identity) allowed to access SQL pools? SqlIdentityControlEnabled pulumi.BoolPtrInput // Specifies the ID of storage data lake gen2 filesystem resource. Changing this forces a new resource to be created. StorageDataLakeGen2FilesystemId pulumi.StringPtrInput // A mapping of tags which should be assigned to the Synapse Workspace. Tags pulumi.StringMapInput } func (WorkspaceState) ElementType() reflect.Type { return reflect.TypeOf((*workspaceState)(nil)).Elem() } type workspaceArgs struct { // An `azureDevopsRepo` block as defined below. AzureDevopsRepo *WorkspaceAzureDevopsRepo `pulumi:"azureDevopsRepo"` // Is Azure Active Directory Authentication the only way to authenticate with resources inside this synapse Workspace. Defaults to `false`. AzureadAuthenticationOnly *bool `pulumi:"azureadAuthenticationOnly"` // Subnet ID used for computes in workspace Changing this forces a new resource to be created. ComputeSubnetId *string `pulumi:"computeSubnetId"` // A `customerManagedKey` block as defined below. CustomerManagedKey *WorkspaceCustomerManagedKey `pulumi:"customerManagedKey"` // Is data exfiltration protection enabled in this workspace? If set to `true`, `managedVirtualNetworkEnabled` must also be set to `true`. Changing this forces a new resource to be created. DataExfiltrationProtectionEnabled *bool `pulumi:"dataExfiltrationProtectionEnabled"` // A `githubRepo` block as defined below. GithubRepo *WorkspaceGithubRepo `pulumi:"githubRepo"` // An `identity` block as defined below. Identity *WorkspaceIdentity `pulumi:"identity"` // Allowed AAD Tenant Ids For Linking. LinkingAllowedForAadTenantIds []string `pulumi:"linkingAllowedForAadTenantIds"` // Specifies the Azure Region where the synapse Workspace should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Workspace managed resource group. Changing this forces a new resource to be created. ManagedResourceGroupName *string `pulumi:"managedResourceGroupName"` // Is Virtual Network enabled for all computes in this workspace? Changing this forces a new resource to be created. ManagedVirtualNetworkEnabled *bool `pulumi:"managedVirtualNetworkEnabled"` // Specifies the name which should be used for this synapse Workspace. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Whether public network access is allowed for the Cognitive Account. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // The ID of purview account. PurviewId *string `pulumi:"purviewId"` // Specifies the name of the Resource Group where the synapse Workspace should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies The login name of the SQL administrator. Changing this forces a new resource to be created. If this is not provided `customerManagedKey` must be provided. SqlAdministratorLogin *string `pulumi:"sqlAdministratorLogin"` // The Password associated with the `sqlAdministratorLogin` for the SQL administrator. If this is not provided `customerManagedKey` must be provided. SqlAdministratorLoginPassword *string `pulumi:"sqlAdministratorLoginPassword"` // Are pipelines (running as workspace's system assigned identity) allowed to access SQL pools? SqlIdentityControlEnabled *bool `pulumi:"sqlIdentityControlEnabled"` // Specifies the ID of storage data lake gen2 filesystem resource. Changing this forces a new resource to be created. StorageDataLakeGen2FilesystemId string `pulumi:"storageDataLakeGen2FilesystemId"` // A mapping of tags which should be assigned to the Synapse Workspace. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Workspace resource. type WorkspaceArgs struct { // An `azureDevopsRepo` block as defined below. AzureDevopsRepo WorkspaceAzureDevopsRepoPtrInput // Is Azure Active Directory Authentication the only way to authenticate with resources inside this synapse Workspace. Defaults to `false`. AzureadAuthenticationOnly pulumi.BoolPtrInput // Subnet ID used for computes in workspace Changing this forces a new resource to be created. ComputeSubnetId pulumi.StringPtrInput // A `customerManagedKey` block as defined below. CustomerManagedKey WorkspaceCustomerManagedKeyPtrInput // Is data exfiltration protection enabled in this workspace? If set to `true`, `managedVirtualNetworkEnabled` must also be set to `true`. Changing this forces a new resource to be created. DataExfiltrationProtectionEnabled pulumi.BoolPtrInput // A `githubRepo` block as defined below. GithubRepo WorkspaceGithubRepoPtrInput // An `identity` block as defined below. Identity WorkspaceIdentityPtrInput // Allowed AAD Tenant Ids For Linking. LinkingAllowedForAadTenantIds pulumi.StringArrayInput // Specifies the Azure Region where the synapse Workspace should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Workspace managed resource group. Changing this forces a new resource to be created. ManagedResourceGroupName pulumi.StringPtrInput // Is Virtual Network enabled for all computes in this workspace? Changing this forces a new resource to be created. ManagedVirtualNetworkEnabled pulumi.BoolPtrInput // Specifies the name which should be used for this synapse Workspace. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Whether public network access is allowed for the Cognitive Account. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // The ID of purview account. PurviewId pulumi.StringPtrInput // Specifies the name of the Resource Group where the synapse Workspace should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Specifies The login name of the SQL administrator. Changing this forces a new resource to be created. If this is not provided `customerManagedKey` must be provided. SqlAdministratorLogin pulumi.StringPtrInput // The Password associated with the `sqlAdministratorLogin` for the SQL administrator. If this is not provided `customerManagedKey` must be provided. SqlAdministratorLoginPassword pulumi.StringPtrInput // Are pipelines (running as workspace's system assigned identity) allowed to access SQL pools? SqlIdentityControlEnabled pulumi.BoolPtrInput // Specifies the ID of storage data lake gen2 filesystem resource. Changing this forces a new resource to be created. StorageDataLakeGen2FilesystemId pulumi.StringInput // A mapping of tags which should be assigned to the Synapse Workspace. Tags pulumi.StringMapInput } func (WorkspaceArgs) ElementType() reflect.Type { return reflect.TypeOf((*workspaceArgs)(nil)).Elem() } type WorkspaceInput interface { pulumi.Input ToWorkspaceOutput() WorkspaceOutput ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput } func (*Workspace) ElementType() reflect.Type { return reflect.TypeOf((**Workspace)(nil)).Elem() } func (i *Workspace) ToWorkspaceOutput() WorkspaceOutput { return i.ToWorkspaceOutputWithContext(context.Background()) } func (i *Workspace) ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceOutput) } // WorkspaceArrayInput is an input type that accepts WorkspaceArray and WorkspaceArrayOutput values. // You can construct a concrete instance of `WorkspaceArrayInput` via: // // WorkspaceArray{ WorkspaceArgs{...} } type WorkspaceArrayInput interface { pulumi.Input ToWorkspaceArrayOutput() WorkspaceArrayOutput ToWorkspaceArrayOutputWithContext(context.Context) WorkspaceArrayOutput } type WorkspaceArray []WorkspaceInput func (WorkspaceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Workspace)(nil)).Elem() } func (i WorkspaceArray) ToWorkspaceArrayOutput() WorkspaceArrayOutput { return i.ToWorkspaceArrayOutputWithContext(context.Background()) } func (i WorkspaceArray) ToWorkspaceArrayOutputWithContext(ctx context.Context) WorkspaceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceArrayOutput) } // WorkspaceMapInput is an input type that accepts WorkspaceMap and WorkspaceMapOutput values. // You can construct a concrete instance of `WorkspaceMapInput` via: // // WorkspaceMap{ "key": WorkspaceArgs{...} } type WorkspaceMapInput interface { pulumi.Input ToWorkspaceMapOutput() WorkspaceMapOutput ToWorkspaceMapOutputWithContext(context.Context) WorkspaceMapOutput } type WorkspaceMap map[string]WorkspaceInput func (WorkspaceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Workspace)(nil)).Elem() } func (i WorkspaceMap) ToWorkspaceMapOutput() WorkspaceMapOutput { return i.ToWorkspaceMapOutputWithContext(context.Background()) } func (i WorkspaceMap) ToWorkspaceMapOutputWithContext(ctx context.Context) WorkspaceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceMapOutput) } type WorkspaceOutput struct{ *pulumi.OutputState } func (WorkspaceOutput) ElementType() reflect.Type { return reflect.TypeOf((**Workspace)(nil)).Elem() } func (o WorkspaceOutput) ToWorkspaceOutput() WorkspaceOutput { return o } func (o WorkspaceOutput) ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput { return o } // An `azureDevopsRepo` block as defined below. func (o WorkspaceOutput) AzureDevopsRepo() WorkspaceAzureDevopsRepoPtrOutput { return o.ApplyT(func(v *Workspace) WorkspaceAzureDevopsRepoPtrOutput { return v.AzureDevopsRepo }).(WorkspaceAzureDevopsRepoPtrOutput) } // Is Azure Active Directory Authentication the only way to authenticate with resources inside this synapse Workspace. Defaults to `false`. func (o WorkspaceOutput) AzureadAuthenticationOnly() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Workspace) pulumi.BoolPtrOutput { return v.AzureadAuthenticationOnly }).(pulumi.BoolPtrOutput) } // Subnet ID used for computes in workspace Changing this forces a new resource to be created. func (o WorkspaceOutput) ComputeSubnetId() pulumi.StringPtrOutput { return o.ApplyT(func(v *Workspace) pulumi.StringPtrOutput { return v.ComputeSubnetId }).(pulumi.StringPtrOutput) } // A map of Connectivity endpoints for this Synapse Workspace. Possible key values are `dev`, `sql`, `sqlOnDemand`, and `web`. func (o WorkspaceOutput) ConnectivityEndpoints() pulumi.StringMapOutput { return o.ApplyT(func(v *Workspace) pulumi.StringMapOutput { return v.ConnectivityEndpoints }).(pulumi.StringMapOutput) } // A `customerManagedKey` block as defined below. func (o WorkspaceOutput) CustomerManagedKey() WorkspaceCustomerManagedKeyPtrOutput { return o.ApplyT(func(v *Workspace) WorkspaceCustomerManagedKeyPtrOutput { return v.CustomerManagedKey }).(WorkspaceCustomerManagedKeyPtrOutput) } // Is data exfiltration protection enabled in this workspace? If set to `true`, `managedVirtualNetworkEnabled` must also be set to `true`. Changing this forces a new resource to be created. func (o WorkspaceOutput) DataExfiltrationProtectionEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Workspace) pulumi.BoolPtrOutput { return v.DataExfiltrationProtectionEnabled }).(pulumi.BoolPtrOutput) } // A `githubRepo` block as defined below. func (o WorkspaceOutput) GithubRepo() WorkspaceGithubRepoPtrOutput { return o.ApplyT(func(v *Workspace) WorkspaceGithubRepoPtrOutput { return v.GithubRepo }).(WorkspaceGithubRepoPtrOutput) } // An `identity` block as defined below. func (o WorkspaceOutput) Identity() WorkspaceIdentityPtrOutput { return o.ApplyT(func(v *Workspace) WorkspaceIdentityPtrOutput { return v.Identity }).(WorkspaceIdentityPtrOutput) } // Allowed AAD Tenant Ids For Linking. func (o WorkspaceOutput) LinkingAllowedForAadTenantIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *Workspace) pulumi.StringArrayOutput { return v.LinkingAllowedForAadTenantIds }).(pulumi.StringArrayOutput) } // Specifies the Azure Region where the synapse Workspace should exist. Changing this forces a new resource to be created. func (o WorkspaceOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Workspace managed resource group. Changing this forces a new resource to be created. func (o WorkspaceOutput) ManagedResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.ManagedResourceGroupName }).(pulumi.StringOutput) } // Is Virtual Network enabled for all computes in this workspace? Changing this forces a new resource to be created.
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/synapse/integrationRuntimeAzure.go
sdk/go/azure/synapse/integrationRuntimeAzure.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Synapse Azure Integration Runtime. // // ## 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("example"), // Location: example.Location, // ResourceGroupName: example.Name, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // _, err = storage.NewContainer(ctx, "example", &storage.ContainerArgs{ // Name: pulumi.String("content"), // StorageAccountName: exampleAccount.Name, // ContainerAccessType: pulumi.String("private"), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // Location: example.Location, // ResourceGroupName: example.Name, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // ManagedVirtualNetworkEnabled: pulumi.Bool(true), // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // _, err = synapse.NewFirewallRule(ctx, "example", &synapse.FirewallRuleArgs{ // Name: pulumi.String("AllowAll"), // SynapseWorkspaceId: exampleWorkspace.ID(), // StartIpAddress: pulumi.String("0.0.0.0"), // EndIpAddress: pulumi.String("255.255.255.255"), // }) // if err != nil { // return err // } // _, err = synapse.NewIntegrationRuntimeAzure(ctx, "example", &synapse.IntegrationRuntimeAzureArgs{ // Name: pulumi.String("example"), // SynapseWorkspaceId: exampleWorkspace.ID(), // Location: example.Location, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse Azure Integration Runtimes can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/integrationRuntimeAzure:IntegrationRuntimeAzure example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Synapse/workspaces/workspace1/integrationRuntimes/IntegrationRuntime1 // ``` type IntegrationRuntimeAzure struct { pulumi.CustomResourceState // Compute type of the cluster which will execute data flow job. Valid values are `General`, `ComputeOptimized` and `MemoryOptimized`. Defaults to `General`. ComputeType pulumi.StringPtrOutput `pulumi:"computeType"` // Core count of the cluster which will execute data flow job. Valid values are `8`, `16`, `32`, `48`, `80`, `144` and `272`. Defaults to `8`. CoreCount pulumi.IntPtrOutput `pulumi:"coreCount"` // Integration runtime description. Description pulumi.StringPtrOutput `pulumi:"description"` // The Azure Region where the Synapse Azure Integration Runtime should exist. Use `AutoResolve` to create an auto-resolve integration runtime. Changing this forces a new Synapse Azure Integration Runtime to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Synapse Azure Integration Runtime. Changing this forces a new Synapse Azure Integration Runtime to be created. Name pulumi.StringOutput `pulumi:"name"` // The Synapse Workspace ID in which to associate the Integration Runtime with. Changing this forces a new Synapse Azure Integration Runtime to be created. SynapseWorkspaceId pulumi.StringOutput `pulumi:"synapseWorkspaceId"` // Time to live (in minutes) setting of the cluster which will execute data flow job. Defaults to `0`. TimeToLiveMin pulumi.IntPtrOutput `pulumi:"timeToLiveMin"` } // NewIntegrationRuntimeAzure registers a new resource with the given unique name, arguments, and options. func NewIntegrationRuntimeAzure(ctx *pulumi.Context, name string, args *IntegrationRuntimeAzureArgs, opts ...pulumi.ResourceOption) (*IntegrationRuntimeAzure, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.SynapseWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'SynapseWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource IntegrationRuntimeAzure err := ctx.RegisterResource("azure:synapse/integrationRuntimeAzure:IntegrationRuntimeAzure", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetIntegrationRuntimeAzure gets an existing IntegrationRuntimeAzure 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 GetIntegrationRuntimeAzure(ctx *pulumi.Context, name string, id pulumi.IDInput, state *IntegrationRuntimeAzureState, opts ...pulumi.ResourceOption) (*IntegrationRuntimeAzure, error) { var resource IntegrationRuntimeAzure err := ctx.ReadResource("azure:synapse/integrationRuntimeAzure:IntegrationRuntimeAzure", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering IntegrationRuntimeAzure resources. type integrationRuntimeAzureState struct { // Compute type of the cluster which will execute data flow job. Valid values are `General`, `ComputeOptimized` and `MemoryOptimized`. Defaults to `General`. ComputeType *string `pulumi:"computeType"` // Core count of the cluster which will execute data flow job. Valid values are `8`, `16`, `32`, `48`, `80`, `144` and `272`. Defaults to `8`. CoreCount *int `pulumi:"coreCount"` // Integration runtime description. Description *string `pulumi:"description"` // The Azure Region where the Synapse Azure Integration Runtime should exist. Use `AutoResolve` to create an auto-resolve integration runtime. Changing this forces a new Synapse Azure Integration Runtime to be created. Location *string `pulumi:"location"` // The name which should be used for this Synapse Azure Integration Runtime. Changing this forces a new Synapse Azure Integration Runtime to be created. Name *string `pulumi:"name"` // The Synapse Workspace ID in which to associate the Integration Runtime with. Changing this forces a new Synapse Azure Integration Runtime to be created. SynapseWorkspaceId *string `pulumi:"synapseWorkspaceId"` // Time to live (in minutes) setting of the cluster which will execute data flow job. Defaults to `0`. TimeToLiveMin *int `pulumi:"timeToLiveMin"` } type IntegrationRuntimeAzureState struct { // Compute type of the cluster which will execute data flow job. Valid values are `General`, `ComputeOptimized` and `MemoryOptimized`. Defaults to `General`. ComputeType pulumi.StringPtrInput // Core count of the cluster which will execute data flow job. Valid values are `8`, `16`, `32`, `48`, `80`, `144` and `272`. Defaults to `8`. CoreCount pulumi.IntPtrInput // Integration runtime description. Description pulumi.StringPtrInput // The Azure Region where the Synapse Azure Integration Runtime should exist. Use `AutoResolve` to create an auto-resolve integration runtime. Changing this forces a new Synapse Azure Integration Runtime to be created. Location pulumi.StringPtrInput // The name which should be used for this Synapse Azure Integration Runtime. Changing this forces a new Synapse Azure Integration Runtime to be created. Name pulumi.StringPtrInput // The Synapse Workspace ID in which to associate the Integration Runtime with. Changing this forces a new Synapse Azure Integration Runtime to be created. SynapseWorkspaceId pulumi.StringPtrInput // Time to live (in minutes) setting of the cluster which will execute data flow job. Defaults to `0`. TimeToLiveMin pulumi.IntPtrInput } func (IntegrationRuntimeAzureState) ElementType() reflect.Type { return reflect.TypeOf((*integrationRuntimeAzureState)(nil)).Elem() } type integrationRuntimeAzureArgs struct { // Compute type of the cluster which will execute data flow job. Valid values are `General`, `ComputeOptimized` and `MemoryOptimized`. Defaults to `General`. ComputeType *string `pulumi:"computeType"` // Core count of the cluster which will execute data flow job. Valid values are `8`, `16`, `32`, `48`, `80`, `144` and `272`. Defaults to `8`. CoreCount *int `pulumi:"coreCount"` // Integration runtime description. Description *string `pulumi:"description"` // The Azure Region where the Synapse Azure Integration Runtime should exist. Use `AutoResolve` to create an auto-resolve integration runtime. Changing this forces a new Synapse Azure Integration Runtime to be created. Location *string `pulumi:"location"` // The name which should be used for this Synapse Azure Integration Runtime. Changing this forces a new Synapse Azure Integration Runtime to be created. Name *string `pulumi:"name"` // The Synapse Workspace ID in which to associate the Integration Runtime with. Changing this forces a new Synapse Azure Integration Runtime to be created. SynapseWorkspaceId string `pulumi:"synapseWorkspaceId"` // Time to live (in minutes) setting of the cluster which will execute data flow job. Defaults to `0`. TimeToLiveMin *int `pulumi:"timeToLiveMin"` } // The set of arguments for constructing a IntegrationRuntimeAzure resource. type IntegrationRuntimeAzureArgs struct { // Compute type of the cluster which will execute data flow job. Valid values are `General`, `ComputeOptimized` and `MemoryOptimized`. Defaults to `General`. ComputeType pulumi.StringPtrInput // Core count of the cluster which will execute data flow job. Valid values are `8`, `16`, `32`, `48`, `80`, `144` and `272`. Defaults to `8`. CoreCount pulumi.IntPtrInput // Integration runtime description. Description pulumi.StringPtrInput // The Azure Region where the Synapse Azure Integration Runtime should exist. Use `AutoResolve` to create an auto-resolve integration runtime. Changing this forces a new Synapse Azure Integration Runtime to be created. Location pulumi.StringPtrInput // The name which should be used for this Synapse Azure Integration Runtime. Changing this forces a new Synapse Azure Integration Runtime to be created. Name pulumi.StringPtrInput // The Synapse Workspace ID in which to associate the Integration Runtime with. Changing this forces a new Synapse Azure Integration Runtime to be created. SynapseWorkspaceId pulumi.StringInput // Time to live (in minutes) setting of the cluster which will execute data flow job. Defaults to `0`. TimeToLiveMin pulumi.IntPtrInput } func (IntegrationRuntimeAzureArgs) ElementType() reflect.Type { return reflect.TypeOf((*integrationRuntimeAzureArgs)(nil)).Elem() } type IntegrationRuntimeAzureInput interface { pulumi.Input ToIntegrationRuntimeAzureOutput() IntegrationRuntimeAzureOutput ToIntegrationRuntimeAzureOutputWithContext(ctx context.Context) IntegrationRuntimeAzureOutput } func (*IntegrationRuntimeAzure) ElementType() reflect.Type { return reflect.TypeOf((**IntegrationRuntimeAzure)(nil)).Elem() } func (i *IntegrationRuntimeAzure) ToIntegrationRuntimeAzureOutput() IntegrationRuntimeAzureOutput { return i.ToIntegrationRuntimeAzureOutputWithContext(context.Background()) } func (i *IntegrationRuntimeAzure) ToIntegrationRuntimeAzureOutputWithContext(ctx context.Context) IntegrationRuntimeAzureOutput { return pulumi.ToOutputWithContext(ctx, i).(IntegrationRuntimeAzureOutput) } // IntegrationRuntimeAzureArrayInput is an input type that accepts IntegrationRuntimeAzureArray and IntegrationRuntimeAzureArrayOutput values. // You can construct a concrete instance of `IntegrationRuntimeAzureArrayInput` via: // // IntegrationRuntimeAzureArray{ IntegrationRuntimeAzureArgs{...} } type IntegrationRuntimeAzureArrayInput interface { pulumi.Input ToIntegrationRuntimeAzureArrayOutput() IntegrationRuntimeAzureArrayOutput ToIntegrationRuntimeAzureArrayOutputWithContext(context.Context) IntegrationRuntimeAzureArrayOutput } type IntegrationRuntimeAzureArray []IntegrationRuntimeAzureInput func (IntegrationRuntimeAzureArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*IntegrationRuntimeAzure)(nil)).Elem() } func (i IntegrationRuntimeAzureArray) ToIntegrationRuntimeAzureArrayOutput() IntegrationRuntimeAzureArrayOutput { return i.ToIntegrationRuntimeAzureArrayOutputWithContext(context.Background()) } func (i IntegrationRuntimeAzureArray) ToIntegrationRuntimeAzureArrayOutputWithContext(ctx context.Context) IntegrationRuntimeAzureArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(IntegrationRuntimeAzureArrayOutput) } // IntegrationRuntimeAzureMapInput is an input type that accepts IntegrationRuntimeAzureMap and IntegrationRuntimeAzureMapOutput values. // You can construct a concrete instance of `IntegrationRuntimeAzureMapInput` via: // // IntegrationRuntimeAzureMap{ "key": IntegrationRuntimeAzureArgs{...} } type IntegrationRuntimeAzureMapInput interface { pulumi.Input ToIntegrationRuntimeAzureMapOutput() IntegrationRuntimeAzureMapOutput ToIntegrationRuntimeAzureMapOutputWithContext(context.Context) IntegrationRuntimeAzureMapOutput } type IntegrationRuntimeAzureMap map[string]IntegrationRuntimeAzureInput func (IntegrationRuntimeAzureMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*IntegrationRuntimeAzure)(nil)).Elem() } func (i IntegrationRuntimeAzureMap) ToIntegrationRuntimeAzureMapOutput() IntegrationRuntimeAzureMapOutput { return i.ToIntegrationRuntimeAzureMapOutputWithContext(context.Background()) } func (i IntegrationRuntimeAzureMap) ToIntegrationRuntimeAzureMapOutputWithContext(ctx context.Context) IntegrationRuntimeAzureMapOutput { return pulumi.ToOutputWithContext(ctx, i).(IntegrationRuntimeAzureMapOutput) } type IntegrationRuntimeAzureOutput struct{ *pulumi.OutputState } func (IntegrationRuntimeAzureOutput) ElementType() reflect.Type { return reflect.TypeOf((**IntegrationRuntimeAzure)(nil)).Elem() } func (o IntegrationRuntimeAzureOutput) ToIntegrationRuntimeAzureOutput() IntegrationRuntimeAzureOutput { return o } func (o IntegrationRuntimeAzureOutput) ToIntegrationRuntimeAzureOutputWithContext(ctx context.Context) IntegrationRuntimeAzureOutput { return o } // Compute type of the cluster which will execute data flow job. Valid values are `General`, `ComputeOptimized` and `MemoryOptimized`. Defaults to `General`. func (o IntegrationRuntimeAzureOutput) ComputeType() pulumi.StringPtrOutput { return o.ApplyT(func(v *IntegrationRuntimeAzure) pulumi.StringPtrOutput { return v.ComputeType }).(pulumi.StringPtrOutput) } // Core count of the cluster which will execute data flow job. Valid values are `8`, `16`, `32`, `48`, `80`, `144` and `272`. Defaults to `8`. func (o IntegrationRuntimeAzureOutput) CoreCount() pulumi.IntPtrOutput { return o.ApplyT(func(v *IntegrationRuntimeAzure) pulumi.IntPtrOutput { return v.CoreCount }).(pulumi.IntPtrOutput) } // Integration runtime description. func (o IntegrationRuntimeAzureOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *IntegrationRuntimeAzure) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The Azure Region where the Synapse Azure Integration Runtime should exist. Use `AutoResolve` to create an auto-resolve integration runtime. Changing this forces a new Synapse Azure Integration Runtime to be created. func (o IntegrationRuntimeAzureOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *IntegrationRuntimeAzure) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Synapse Azure Integration Runtime. Changing this forces a new Synapse Azure Integration Runtime to be created. func (o IntegrationRuntimeAzureOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *IntegrationRuntimeAzure) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The Synapse Workspace ID in which to associate the Integration Runtime with. Changing this forces a new Synapse Azure Integration Runtime to be created. func (o IntegrationRuntimeAzureOutput) SynapseWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *IntegrationRuntimeAzure) pulumi.StringOutput { return v.SynapseWorkspaceId }).(pulumi.StringOutput) } // Time to live (in minutes) setting of the cluster which will execute data flow job. Defaults to `0`. func (o IntegrationRuntimeAzureOutput) TimeToLiveMin() pulumi.IntPtrOutput { return o.ApplyT(func(v *IntegrationRuntimeAzure) pulumi.IntPtrOutput { return v.TimeToLiveMin }).(pulumi.IntPtrOutput) } type IntegrationRuntimeAzureArrayOutput struct{ *pulumi.OutputState } func (IntegrationRuntimeAzureArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*IntegrationRuntimeAzure)(nil)).Elem() } func (o IntegrationRuntimeAzureArrayOutput) ToIntegrationRuntimeAzureArrayOutput() IntegrationRuntimeAzureArrayOutput { return o } func (o IntegrationRuntimeAzureArrayOutput) ToIntegrationRuntimeAzureArrayOutputWithContext(ctx context.Context) IntegrationRuntimeAzureArrayOutput { return o } func (o IntegrationRuntimeAzureArrayOutput) Index(i pulumi.IntInput) IntegrationRuntimeAzureOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IntegrationRuntimeAzure { return vs[0].([]*IntegrationRuntimeAzure)[vs[1].(int)] }).(IntegrationRuntimeAzureOutput) } type IntegrationRuntimeAzureMapOutput struct{ *pulumi.OutputState } func (IntegrationRuntimeAzureMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*IntegrationRuntimeAzure)(nil)).Elem() } func (o IntegrationRuntimeAzureMapOutput) ToIntegrationRuntimeAzureMapOutput() IntegrationRuntimeAzureMapOutput { return o } func (o IntegrationRuntimeAzureMapOutput) ToIntegrationRuntimeAzureMapOutputWithContext(ctx context.Context) IntegrationRuntimeAzureMapOutput { return o } func (o IntegrationRuntimeAzureMapOutput) MapIndex(k pulumi.StringInput) IntegrationRuntimeAzureOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IntegrationRuntimeAzure { return vs[0].(map[string]*IntegrationRuntimeAzure)[vs[1].(string)] }).(IntegrationRuntimeAzureOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*IntegrationRuntimeAzureInput)(nil)).Elem(), &IntegrationRuntimeAzure{}) pulumi.RegisterInputType(reflect.TypeOf((*IntegrationRuntimeAzureArrayInput)(nil)).Elem(), IntegrationRuntimeAzureArray{}) pulumi.RegisterInputType(reflect.TypeOf((*IntegrationRuntimeAzureMapInput)(nil)).Elem(), IntegrationRuntimeAzureMap{}) pulumi.RegisterOutputType(IntegrationRuntimeAzureOutput{}) pulumi.RegisterOutputType(IntegrationRuntimeAzureArrayOutput{}) pulumi.RegisterOutputType(IntegrationRuntimeAzureMapOutput{}) }
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/synapse/sqlPool.go
sdk/go/azure/synapse/sqlPool.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Synapse SQL 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("BlobStorage"), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // _, err = synapse.NewSqlPool(ctx, "example", &synapse.SqlPoolArgs{ // Name: pulumi.String("examplesqlpool"), // SynapseWorkspaceId: exampleWorkspace.ID(), // SkuName: pulumi.String("DW100c"), // CreateMode: pulumi.String("Default"), // StorageAccountType: pulumi.String("GRS"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse SQL Pool can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/sqlPool:SqlPool example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Synapse/workspaces/workspace1/sqlPools/sqlPool1 // ``` type SqlPool struct { pulumi.CustomResourceState // The name of the collation to use with this pool, only applicable when `createMode` is set to `Default`. Azure default is `SQL_LATIN1_GENERAL_CP1_CI_AS`. Changing this forces a new Synapse SQL Pool to be created. Collation pulumi.StringOutput `pulumi:"collation"` // Specifies how to create the SQL Pool. Valid values are: `Default`, `Recovery` or `PointInTimeRestore`. Must be `Default` to create a new database. Defaults to `Default`. Changing this forces a new Synapse SQL Pool to be created. CreateMode pulumi.StringPtrOutput `pulumi:"createMode"` // Is transparent data encryption enabled? DataEncrypted pulumi.BoolPtrOutput `pulumi:"dataEncrypted"` // Is geo-backup policy enabled? Defaults to `true`. GeoBackupPolicyEnabled pulumi.BoolPtrOutput `pulumi:"geoBackupPolicyEnabled"` // The name which should be used for this Synapse SQL Pool. Changing this forces a new Synapse SQL Pool to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Synapse SQL Pool or SQL Database which is to back up, only applicable when `createMode` is set to `Recovery`. Changing this forces a new Synapse SQL Pool to be created. RecoveryDatabaseId pulumi.StringPtrOutput `pulumi:"recoveryDatabaseId"` // A `restore` block as defined below. Only applicable when `createMode` is set to `PointInTimeRestore`. Changing this forces a new Synapse SQL Pool to be created. Restore SqlPoolRestorePtrOutput `pulumi:"restore"` // Specifies the SKU Name for this Synapse SQL Pool. Possible values are `DW100c`, `DW200c`, `DW300c`, `DW400c`, `DW500c`, `DW1000c`, `DW1500c`, `DW2000c`, `DW2500c`, `DW3000c`, `DW5000c`, `DW6000c`, `DW7500c`, `DW10000c`, `DW15000c` or `DW30000c`. SkuName pulumi.StringOutput `pulumi:"skuName"` // The storage account type that will be used to store backups for this Synapse SQL Pool. Possible values are `LRS` or `GRS`. Changing this forces a new Synapse SQL Pool to be created. StorageAccountType pulumi.StringOutput `pulumi:"storageAccountType"` // The ID of Synapse Workspace within which this SQL Pool should be created. Changing this forces a new Synapse SQL Pool to be created. SynapseWorkspaceId pulumi.StringOutput `pulumi:"synapseWorkspaceId"` // A mapping of tags which should be assigned to the Synapse SQL Pool. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewSqlPool registers a new resource with the given unique name, arguments, and options. func NewSqlPool(ctx *pulumi.Context, name string, args *SqlPoolArgs, opts ...pulumi.ResourceOption) (*SqlPool, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.SkuName == nil { return nil, errors.New("invalid value for required argument 'SkuName'") } if args.StorageAccountType == nil { return nil, errors.New("invalid value for required argument 'StorageAccountType'") } if args.SynapseWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'SynapseWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SqlPool err := ctx.RegisterResource("azure:synapse/sqlPool:SqlPool", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSqlPool gets an existing SqlPool 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 GetSqlPool(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SqlPoolState, opts ...pulumi.ResourceOption) (*SqlPool, error) { var resource SqlPool err := ctx.ReadResource("azure:synapse/sqlPool:SqlPool", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SqlPool resources. type sqlPoolState struct { // The name of the collation to use with this pool, only applicable when `createMode` is set to `Default`. Azure default is `SQL_LATIN1_GENERAL_CP1_CI_AS`. Changing this forces a new Synapse SQL Pool to be created. Collation *string `pulumi:"collation"` // Specifies how to create the SQL Pool. Valid values are: `Default`, `Recovery` or `PointInTimeRestore`. Must be `Default` to create a new database. Defaults to `Default`. Changing this forces a new Synapse SQL Pool to be created. CreateMode *string `pulumi:"createMode"` // Is transparent data encryption enabled? DataEncrypted *bool `pulumi:"dataEncrypted"` // Is geo-backup policy enabled? Defaults to `true`. GeoBackupPolicyEnabled *bool `pulumi:"geoBackupPolicyEnabled"` // The name which should be used for this Synapse SQL Pool. Changing this forces a new Synapse SQL Pool to be created. Name *string `pulumi:"name"` // The ID of the Synapse SQL Pool or SQL Database which is to back up, only applicable when `createMode` is set to `Recovery`. Changing this forces a new Synapse SQL Pool to be created. RecoveryDatabaseId *string `pulumi:"recoveryDatabaseId"` // A `restore` block as defined below. Only applicable when `createMode` is set to `PointInTimeRestore`. Changing this forces a new Synapse SQL Pool to be created. Restore *SqlPoolRestore `pulumi:"restore"` // Specifies the SKU Name for this Synapse SQL Pool. Possible values are `DW100c`, `DW200c`, `DW300c`, `DW400c`, `DW500c`, `DW1000c`, `DW1500c`, `DW2000c`, `DW2500c`, `DW3000c`, `DW5000c`, `DW6000c`, `DW7500c`, `DW10000c`, `DW15000c` or `DW30000c`. SkuName *string `pulumi:"skuName"` // The storage account type that will be used to store backups for this Synapse SQL Pool. Possible values are `LRS` or `GRS`. Changing this forces a new Synapse SQL Pool to be created. StorageAccountType *string `pulumi:"storageAccountType"` // The ID of Synapse Workspace within which this SQL Pool should be created. Changing this forces a new Synapse SQL Pool to be created. SynapseWorkspaceId *string `pulumi:"synapseWorkspaceId"` // A mapping of tags which should be assigned to the Synapse SQL Pool. Tags map[string]string `pulumi:"tags"` } type SqlPoolState struct { // The name of the collation to use with this pool, only applicable when `createMode` is set to `Default`. Azure default is `SQL_LATIN1_GENERAL_CP1_CI_AS`. Changing this forces a new Synapse SQL Pool to be created. Collation pulumi.StringPtrInput // Specifies how to create the SQL Pool. Valid values are: `Default`, `Recovery` or `PointInTimeRestore`. Must be `Default` to create a new database. Defaults to `Default`. Changing this forces a new Synapse SQL Pool to be created. CreateMode pulumi.StringPtrInput // Is transparent data encryption enabled? DataEncrypted pulumi.BoolPtrInput // Is geo-backup policy enabled? Defaults to `true`. GeoBackupPolicyEnabled pulumi.BoolPtrInput // The name which should be used for this Synapse SQL Pool. Changing this forces a new Synapse SQL Pool to be created. Name pulumi.StringPtrInput // The ID of the Synapse SQL Pool or SQL Database which is to back up, only applicable when `createMode` is set to `Recovery`. Changing this forces a new Synapse SQL Pool to be created. RecoveryDatabaseId pulumi.StringPtrInput // A `restore` block as defined below. Only applicable when `createMode` is set to `PointInTimeRestore`. Changing this forces a new Synapse SQL Pool to be created. Restore SqlPoolRestorePtrInput // Specifies the SKU Name for this Synapse SQL Pool. Possible values are `DW100c`, `DW200c`, `DW300c`, `DW400c`, `DW500c`, `DW1000c`, `DW1500c`, `DW2000c`, `DW2500c`, `DW3000c`, `DW5000c`, `DW6000c`, `DW7500c`, `DW10000c`, `DW15000c` or `DW30000c`. SkuName pulumi.StringPtrInput // The storage account type that will be used to store backups for this Synapse SQL Pool. Possible values are `LRS` or `GRS`. Changing this forces a new Synapse SQL Pool to be created. StorageAccountType pulumi.StringPtrInput // The ID of Synapse Workspace within which this SQL Pool should be created. Changing this forces a new Synapse SQL Pool to be created. SynapseWorkspaceId pulumi.StringPtrInput // A mapping of tags which should be assigned to the Synapse SQL Pool. Tags pulumi.StringMapInput } func (SqlPoolState) ElementType() reflect.Type { return reflect.TypeOf((*sqlPoolState)(nil)).Elem() } type sqlPoolArgs struct { // The name of the collation to use with this pool, only applicable when `createMode` is set to `Default`. Azure default is `SQL_LATIN1_GENERAL_CP1_CI_AS`. Changing this forces a new Synapse SQL Pool to be created. Collation *string `pulumi:"collation"` // Specifies how to create the SQL Pool. Valid values are: `Default`, `Recovery` or `PointInTimeRestore`. Must be `Default` to create a new database. Defaults to `Default`. Changing this forces a new Synapse SQL Pool to be created. CreateMode *string `pulumi:"createMode"` // Is transparent data encryption enabled? DataEncrypted *bool `pulumi:"dataEncrypted"` // Is geo-backup policy enabled? Defaults to `true`. GeoBackupPolicyEnabled *bool `pulumi:"geoBackupPolicyEnabled"` // The name which should be used for this Synapse SQL Pool. Changing this forces a new Synapse SQL Pool to be created. Name *string `pulumi:"name"` // The ID of the Synapse SQL Pool or SQL Database which is to back up, only applicable when `createMode` is set to `Recovery`. Changing this forces a new Synapse SQL Pool to be created. RecoveryDatabaseId *string `pulumi:"recoveryDatabaseId"` // A `restore` block as defined below. Only applicable when `createMode` is set to `PointInTimeRestore`. Changing this forces a new Synapse SQL Pool to be created. Restore *SqlPoolRestore `pulumi:"restore"` // Specifies the SKU Name for this Synapse SQL Pool. Possible values are `DW100c`, `DW200c`, `DW300c`, `DW400c`, `DW500c`, `DW1000c`, `DW1500c`, `DW2000c`, `DW2500c`, `DW3000c`, `DW5000c`, `DW6000c`, `DW7500c`, `DW10000c`, `DW15000c` or `DW30000c`. SkuName string `pulumi:"skuName"` // The storage account type that will be used to store backups for this Synapse SQL Pool. Possible values are `LRS` or `GRS`. Changing this forces a new Synapse SQL Pool to be created. StorageAccountType string `pulumi:"storageAccountType"` // The ID of Synapse Workspace within which this SQL Pool should be created. Changing this forces a new Synapse SQL Pool to be created. SynapseWorkspaceId string `pulumi:"synapseWorkspaceId"` // A mapping of tags which should be assigned to the Synapse SQL Pool. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a SqlPool resource. type SqlPoolArgs struct { // The name of the collation to use with this pool, only applicable when `createMode` is set to `Default`. Azure default is `SQL_LATIN1_GENERAL_CP1_CI_AS`. Changing this forces a new Synapse SQL Pool to be created. Collation pulumi.StringPtrInput // Specifies how to create the SQL Pool. Valid values are: `Default`, `Recovery` or `PointInTimeRestore`. Must be `Default` to create a new database. Defaults to `Default`. Changing this forces a new Synapse SQL Pool to be created. CreateMode pulumi.StringPtrInput // Is transparent data encryption enabled? DataEncrypted pulumi.BoolPtrInput // Is geo-backup policy enabled? Defaults to `true`. GeoBackupPolicyEnabled pulumi.BoolPtrInput // The name which should be used for this Synapse SQL Pool. Changing this forces a new Synapse SQL Pool to be created. Name pulumi.StringPtrInput // The ID of the Synapse SQL Pool or SQL Database which is to back up, only applicable when `createMode` is set to `Recovery`. Changing this forces a new Synapse SQL Pool to be created. RecoveryDatabaseId pulumi.StringPtrInput // A `restore` block as defined below. Only applicable when `createMode` is set to `PointInTimeRestore`. Changing this forces a new Synapse SQL Pool to be created. Restore SqlPoolRestorePtrInput // Specifies the SKU Name for this Synapse SQL Pool. Possible values are `DW100c`, `DW200c`, `DW300c`, `DW400c`, `DW500c`, `DW1000c`, `DW1500c`, `DW2000c`, `DW2500c`, `DW3000c`, `DW5000c`, `DW6000c`, `DW7500c`, `DW10000c`, `DW15000c` or `DW30000c`. SkuName pulumi.StringInput // The storage account type that will be used to store backups for this Synapse SQL Pool. Possible values are `LRS` or `GRS`. Changing this forces a new Synapse SQL Pool to be created. StorageAccountType pulumi.StringInput // The ID of Synapse Workspace within which this SQL Pool should be created. Changing this forces a new Synapse SQL Pool to be created. SynapseWorkspaceId pulumi.StringInput // A mapping of tags which should be assigned to the Synapse SQL Pool. Tags pulumi.StringMapInput } func (SqlPoolArgs) ElementType() reflect.Type { return reflect.TypeOf((*sqlPoolArgs)(nil)).Elem() } type SqlPoolInput interface { pulumi.Input ToSqlPoolOutput() SqlPoolOutput ToSqlPoolOutputWithContext(ctx context.Context) SqlPoolOutput } func (*SqlPool) ElementType() reflect.Type { return reflect.TypeOf((**SqlPool)(nil)).Elem() } func (i *SqlPool) ToSqlPoolOutput() SqlPoolOutput { return i.ToSqlPoolOutputWithContext(context.Background()) } func (i *SqlPool) ToSqlPoolOutputWithContext(ctx context.Context) SqlPoolOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolOutput) } // SqlPoolArrayInput is an input type that accepts SqlPoolArray and SqlPoolArrayOutput values. // You can construct a concrete instance of `SqlPoolArrayInput` via: // // SqlPoolArray{ SqlPoolArgs{...} } type SqlPoolArrayInput interface { pulumi.Input ToSqlPoolArrayOutput() SqlPoolArrayOutput ToSqlPoolArrayOutputWithContext(context.Context) SqlPoolArrayOutput } type SqlPoolArray []SqlPoolInput func (SqlPoolArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SqlPool)(nil)).Elem() } func (i SqlPoolArray) ToSqlPoolArrayOutput() SqlPoolArrayOutput { return i.ToSqlPoolArrayOutputWithContext(context.Background()) } func (i SqlPoolArray) ToSqlPoolArrayOutputWithContext(ctx context.Context) SqlPoolArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolArrayOutput) } // SqlPoolMapInput is an input type that accepts SqlPoolMap and SqlPoolMapOutput values. // You can construct a concrete instance of `SqlPoolMapInput` via: // // SqlPoolMap{ "key": SqlPoolArgs{...} } type SqlPoolMapInput interface { pulumi.Input ToSqlPoolMapOutput() SqlPoolMapOutput ToSqlPoolMapOutputWithContext(context.Context) SqlPoolMapOutput } type SqlPoolMap map[string]SqlPoolInput func (SqlPoolMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SqlPool)(nil)).Elem() } func (i SqlPoolMap) ToSqlPoolMapOutput() SqlPoolMapOutput { return i.ToSqlPoolMapOutputWithContext(context.Background()) } func (i SqlPoolMap) ToSqlPoolMapOutputWithContext(ctx context.Context) SqlPoolMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SqlPoolMapOutput) } type SqlPoolOutput struct{ *pulumi.OutputState } func (SqlPoolOutput) ElementType() reflect.Type { return reflect.TypeOf((**SqlPool)(nil)).Elem() } func (o SqlPoolOutput) ToSqlPoolOutput() SqlPoolOutput { return o } func (o SqlPoolOutput) ToSqlPoolOutputWithContext(ctx context.Context) SqlPoolOutput { return o } // The name of the collation to use with this pool, only applicable when `createMode` is set to `Default`. Azure default is `SQL_LATIN1_GENERAL_CP1_CI_AS`. Changing this forces a new Synapse SQL Pool to be created. func (o SqlPoolOutput) Collation() pulumi.StringOutput { return o.ApplyT(func(v *SqlPool) pulumi.StringOutput { return v.Collation }).(pulumi.StringOutput) } // Specifies how to create the SQL Pool. Valid values are: `Default`, `Recovery` or `PointInTimeRestore`. Must be `Default` to create a new database. Defaults to `Default`. Changing this forces a new Synapse SQL Pool to be created. func (o SqlPoolOutput) CreateMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *SqlPool) pulumi.StringPtrOutput { return v.CreateMode }).(pulumi.StringPtrOutput) } // Is transparent data encryption enabled? func (o SqlPoolOutput) DataEncrypted() pulumi.BoolPtrOutput { return o.ApplyT(func(v *SqlPool) pulumi.BoolPtrOutput { return v.DataEncrypted }).(pulumi.BoolPtrOutput) } // Is geo-backup policy enabled? Defaults to `true`. func (o SqlPoolOutput) GeoBackupPolicyEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *SqlPool) pulumi.BoolPtrOutput { return v.GeoBackupPolicyEnabled }).(pulumi.BoolPtrOutput) } // The name which should be used for this Synapse SQL Pool. Changing this forces a new Synapse SQL Pool to be created. func (o SqlPoolOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SqlPool) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Synapse SQL Pool or SQL Database which is to back up, only applicable when `createMode` is set to `Recovery`. Changing this forces a new Synapse SQL Pool to be created. func (o SqlPoolOutput) RecoveryDatabaseId() pulumi.StringPtrOutput { return o.ApplyT(func(v *SqlPool) pulumi.StringPtrOutput { return v.RecoveryDatabaseId }).(pulumi.StringPtrOutput) } // A `restore` block as defined below. Only applicable when `createMode` is set to `PointInTimeRestore`. Changing this forces a new Synapse SQL Pool to be created. func (o SqlPoolOutput) Restore() SqlPoolRestorePtrOutput { return o.ApplyT(func(v *SqlPool) SqlPoolRestorePtrOutput { return v.Restore }).(SqlPoolRestorePtrOutput) } // Specifies the SKU Name for this Synapse SQL Pool. Possible values are `DW100c`, `DW200c`, `DW300c`, `DW400c`, `DW500c`, `DW1000c`, `DW1500c`, `DW2000c`, `DW2500c`, `DW3000c`, `DW5000c`, `DW6000c`, `DW7500c`, `DW10000c`, `DW15000c` or `DW30000c`. func (o SqlPoolOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v *SqlPool) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput) } // The storage account type that will be used to store backups for this Synapse SQL Pool. Possible values are `LRS` or `GRS`. Changing this forces a new Synapse SQL Pool to be created. func (o SqlPoolOutput) StorageAccountType() pulumi.StringOutput { return o.ApplyT(func(v *SqlPool) pulumi.StringOutput { return v.StorageAccountType }).(pulumi.StringOutput) } // The ID of Synapse Workspace within which this SQL Pool should be created. Changing this forces a new Synapse SQL Pool to be created. func (o SqlPoolOutput) SynapseWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *SqlPool) pulumi.StringOutput { return v.SynapseWorkspaceId }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Synapse SQL Pool. func (o SqlPoolOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *SqlPool) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type SqlPoolArrayOutput struct{ *pulumi.OutputState } func (SqlPoolArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SqlPool)(nil)).Elem() } func (o SqlPoolArrayOutput) ToSqlPoolArrayOutput() SqlPoolArrayOutput { return o } func (o SqlPoolArrayOutput) ToSqlPoolArrayOutputWithContext(ctx context.Context) SqlPoolArrayOutput { return o } func (o SqlPoolArrayOutput) Index(i pulumi.IntInput) SqlPoolOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SqlPool { return vs[0].([]*SqlPool)[vs[1].(int)] }).(SqlPoolOutput) } type SqlPoolMapOutput struct{ *pulumi.OutputState } func (SqlPoolMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SqlPool)(nil)).Elem() } func (o SqlPoolMapOutput) ToSqlPoolMapOutput() SqlPoolMapOutput { return o } func (o SqlPoolMapOutput) ToSqlPoolMapOutputWithContext(ctx context.Context) SqlPoolMapOutput { return o } func (o SqlPoolMapOutput) MapIndex(k pulumi.StringInput) SqlPoolOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SqlPool { return vs[0].(map[string]*SqlPool)[vs[1].(string)] }).(SqlPoolOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolInput)(nil)).Elem(), &SqlPool{}) pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolArrayInput)(nil)).Elem(), SqlPoolArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SqlPoolMapInput)(nil)).Elem(), SqlPoolMap{}) pulumi.RegisterOutputType(SqlPoolOutput{}) pulumi.RegisterOutputType(SqlPoolArrayOutput{}) pulumi.RegisterOutputType(SqlPoolMapOutput{}) }
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/synapse/firewallRule.go
sdk/go/azure/synapse/firewallRule.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 synapse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Allows you to Manages a Synapse Firewall 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/storage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse" // "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 // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // AccountKind: pulumi.String("StorageV2"), // IsHnsEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{ // Name: pulumi.String("example"), // StorageAccountId: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleWorkspace, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(), // SqlAdministratorLogin: pulumi.String("sqladminuser"), // SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // Identity: &synapse.WorkspaceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // _, err = synapse.NewFirewallRule(ctx, "example", &synapse.FirewallRuleArgs{ // Name: pulumi.String("AllowAll"), // SynapseWorkspaceId: exampleWorkspace.ID(), // StartIpAddress: pulumi.String("0.0.0.0"), // EndIpAddress: pulumi.String("255.255.255.255"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Synapse Firewall Rule can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:synapse/firewallRule:FirewallRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroup1/providers/Microsoft.Synapse/workspaces/workspace1/firewallRules/rule1 // ``` type FirewallRule struct { pulumi.CustomResourceState // The ending IP address to allow through the firewall for this rule. // // > **Note:** The Azure feature `Allow access to Azure services` can be enabled by setting `startIpAddress` and `endIpAddress` to `0.0.0.0`. // // > **Note:** The Azure feature `Allow access to Azure services` requires the `name` to be `AllowAllWindowsAzureIps`. EndIpAddress pulumi.StringOutput `pulumi:"endIpAddress"` // The Name of the firewall rule. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The starting IP address to allow through the firewall for this rule. StartIpAddress pulumi.StringOutput `pulumi:"startIpAddress"` // The ID of the Synapse Workspace on which to create the Firewall Rule. Changing this forces a new resource to be created. SynapseWorkspaceId pulumi.StringOutput `pulumi:"synapseWorkspaceId"` } // NewFirewallRule registers a new resource with the given unique name, arguments, and options. func NewFirewallRule(ctx *pulumi.Context, name string, args *FirewallRuleArgs, opts ...pulumi.ResourceOption) (*FirewallRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.EndIpAddress == nil { return nil, errors.New("invalid value for required argument 'EndIpAddress'") } if args.StartIpAddress == nil { return nil, errors.New("invalid value for required argument 'StartIpAddress'") } if args.SynapseWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'SynapseWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FirewallRule err := ctx.RegisterResource("azure:synapse/firewallRule:FirewallRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFirewallRule gets an existing FirewallRule 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 GetFirewallRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FirewallRuleState, opts ...pulumi.ResourceOption) (*FirewallRule, error) { var resource FirewallRule err := ctx.ReadResource("azure:synapse/firewallRule:FirewallRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FirewallRule resources. type firewallRuleState struct { // The ending IP address to allow through the firewall for this rule. // // > **Note:** The Azure feature `Allow access to Azure services` can be enabled by setting `startIpAddress` and `endIpAddress` to `0.0.0.0`. // // > **Note:** The Azure feature `Allow access to Azure services` requires the `name` to be `AllowAllWindowsAzureIps`. EndIpAddress *string `pulumi:"endIpAddress"` // The Name of the firewall rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The starting IP address to allow through the firewall for this rule. StartIpAddress *string `pulumi:"startIpAddress"` // The ID of the Synapse Workspace on which to create the Firewall Rule. Changing this forces a new resource to be created. SynapseWorkspaceId *string `pulumi:"synapseWorkspaceId"` } type FirewallRuleState struct { // The ending IP address to allow through the firewall for this rule. // // > **Note:** The Azure feature `Allow access to Azure services` can be enabled by setting `startIpAddress` and `endIpAddress` to `0.0.0.0`. // // > **Note:** The Azure feature `Allow access to Azure services` requires the `name` to be `AllowAllWindowsAzureIps`. EndIpAddress pulumi.StringPtrInput // The Name of the firewall rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The starting IP address to allow through the firewall for this rule. StartIpAddress pulumi.StringPtrInput // The ID of the Synapse Workspace on which to create the Firewall Rule. Changing this forces a new resource to be created. SynapseWorkspaceId pulumi.StringPtrInput } func (FirewallRuleState) ElementType() reflect.Type { return reflect.TypeOf((*firewallRuleState)(nil)).Elem() } type firewallRuleArgs struct { // The ending IP address to allow through the firewall for this rule. // // > **Note:** The Azure feature `Allow access to Azure services` can be enabled by setting `startIpAddress` and `endIpAddress` to `0.0.0.0`. // // > **Note:** The Azure feature `Allow access to Azure services` requires the `name` to be `AllowAllWindowsAzureIps`. EndIpAddress string `pulumi:"endIpAddress"` // The Name of the firewall rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The starting IP address to allow through the firewall for this rule. StartIpAddress string `pulumi:"startIpAddress"` // The ID of the Synapse Workspace on which to create the Firewall Rule. Changing this forces a new resource to be created. SynapseWorkspaceId string `pulumi:"synapseWorkspaceId"` } // The set of arguments for constructing a FirewallRule resource. type FirewallRuleArgs struct { // The ending IP address to allow through the firewall for this rule. // // > **Note:** The Azure feature `Allow access to Azure services` can be enabled by setting `startIpAddress` and `endIpAddress` to `0.0.0.0`. // // > **Note:** The Azure feature `Allow access to Azure services` requires the `name` to be `AllowAllWindowsAzureIps`. EndIpAddress pulumi.StringInput // The Name of the firewall rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The starting IP address to allow through the firewall for this rule. StartIpAddress pulumi.StringInput // The ID of the Synapse Workspace on which to create the Firewall Rule. Changing this forces a new resource to be created. SynapseWorkspaceId pulumi.StringInput } func (FirewallRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*firewallRuleArgs)(nil)).Elem() } type FirewallRuleInput interface { pulumi.Input ToFirewallRuleOutput() FirewallRuleOutput ToFirewallRuleOutputWithContext(ctx context.Context) FirewallRuleOutput } func (*FirewallRule) ElementType() reflect.Type { return reflect.TypeOf((**FirewallRule)(nil)).Elem() } func (i *FirewallRule) ToFirewallRuleOutput() FirewallRuleOutput { return i.ToFirewallRuleOutputWithContext(context.Background()) } func (i *FirewallRule) ToFirewallRuleOutputWithContext(ctx context.Context) FirewallRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallRuleOutput) } // FirewallRuleArrayInput is an input type that accepts FirewallRuleArray and FirewallRuleArrayOutput values. // You can construct a concrete instance of `FirewallRuleArrayInput` via: // // FirewallRuleArray{ FirewallRuleArgs{...} } type FirewallRuleArrayInput interface { pulumi.Input ToFirewallRuleArrayOutput() FirewallRuleArrayOutput ToFirewallRuleArrayOutputWithContext(context.Context) FirewallRuleArrayOutput } type FirewallRuleArray []FirewallRuleInput func (FirewallRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FirewallRule)(nil)).Elem() } func (i FirewallRuleArray) ToFirewallRuleArrayOutput() FirewallRuleArrayOutput { return i.ToFirewallRuleArrayOutputWithContext(context.Background()) } func (i FirewallRuleArray) ToFirewallRuleArrayOutputWithContext(ctx context.Context) FirewallRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallRuleArrayOutput) } // FirewallRuleMapInput is an input type that accepts FirewallRuleMap and FirewallRuleMapOutput values. // You can construct a concrete instance of `FirewallRuleMapInput` via: // // FirewallRuleMap{ "key": FirewallRuleArgs{...} } type FirewallRuleMapInput interface { pulumi.Input ToFirewallRuleMapOutput() FirewallRuleMapOutput ToFirewallRuleMapOutputWithContext(context.Context) FirewallRuleMapOutput } type FirewallRuleMap map[string]FirewallRuleInput func (FirewallRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FirewallRule)(nil)).Elem() } func (i FirewallRuleMap) ToFirewallRuleMapOutput() FirewallRuleMapOutput { return i.ToFirewallRuleMapOutputWithContext(context.Background()) } func (i FirewallRuleMap) ToFirewallRuleMapOutputWithContext(ctx context.Context) FirewallRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallRuleMapOutput) } type FirewallRuleOutput struct{ *pulumi.OutputState } func (FirewallRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**FirewallRule)(nil)).Elem() } func (o FirewallRuleOutput) ToFirewallRuleOutput() FirewallRuleOutput { return o } func (o FirewallRuleOutput) ToFirewallRuleOutputWithContext(ctx context.Context) FirewallRuleOutput { return o } // The ending IP address to allow through the firewall for this rule. // // > **Note:** The Azure feature `Allow access to Azure services` can be enabled by setting `startIpAddress` and `endIpAddress` to `0.0.0.0`. // // > **Note:** The Azure feature `Allow access to Azure services` requires the `name` to be `AllowAllWindowsAzureIps`. func (o FirewallRuleOutput) EndIpAddress() pulumi.StringOutput { return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.EndIpAddress }).(pulumi.StringOutput) } // The Name of the firewall rule. Changing this forces a new resource to be created. func (o FirewallRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The starting IP address to allow through the firewall for this rule. func (o FirewallRuleOutput) StartIpAddress() pulumi.StringOutput { return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.StartIpAddress }).(pulumi.StringOutput) } // The ID of the Synapse Workspace on which to create the Firewall Rule. Changing this forces a new resource to be created. func (o FirewallRuleOutput) SynapseWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.SynapseWorkspaceId }).(pulumi.StringOutput) } type FirewallRuleArrayOutput struct{ *pulumi.OutputState } func (FirewallRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FirewallRule)(nil)).Elem() } func (o FirewallRuleArrayOutput) ToFirewallRuleArrayOutput() FirewallRuleArrayOutput { return o } func (o FirewallRuleArrayOutput) ToFirewallRuleArrayOutputWithContext(ctx context.Context) FirewallRuleArrayOutput { return o } func (o FirewallRuleArrayOutput) Index(i pulumi.IntInput) FirewallRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FirewallRule { return vs[0].([]*FirewallRule)[vs[1].(int)] }).(FirewallRuleOutput) } type FirewallRuleMapOutput struct{ *pulumi.OutputState } func (FirewallRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FirewallRule)(nil)).Elem() } func (o FirewallRuleMapOutput) ToFirewallRuleMapOutput() FirewallRuleMapOutput { return o } func (o FirewallRuleMapOutput) ToFirewallRuleMapOutputWithContext(ctx context.Context) FirewallRuleMapOutput { return o } func (o FirewallRuleMapOutput) MapIndex(k pulumi.StringInput) FirewallRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FirewallRule { return vs[0].(map[string]*FirewallRule)[vs[1].(string)] }).(FirewallRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FirewallRuleInput)(nil)).Elem(), &FirewallRule{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallRuleArrayInput)(nil)).Elem(), FirewallRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallRuleMapInput)(nil)).Elem(), FirewallRuleMap{}) pulumi.RegisterOutputType(FirewallRuleOutput{}) pulumi.RegisterOutputType(FirewallRuleArrayOutput{}) pulumi.RegisterOutputType(FirewallRuleMapOutput{}) }
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/role/init.go
sdk/go/azure/role/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 role 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:role/assignment:Assignment": r = &Assignment{} case "azure:role/definition:Definition": r = &Definition{} 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", "role/assignment", &module{version}, ) pulumi.RegisterResourceModule( "azure", "role/definition", &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/role/pulumiTypes.go
sdk/go/azure/role/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 role 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 DefinitionPermission struct { // One or more Allowed Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. Actions []string `pulumi:"actions"` // One or more Allowed Data Actions, such as `*`, `Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. DataActions []string `pulumi:"dataActions"` // One or more Disallowed Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. NotActions []string `pulumi:"notActions"` // One or more Disallowed Data Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. NotDataActions []string `pulumi:"notDataActions"` } // DefinitionPermissionInput is an input type that accepts DefinitionPermissionArgs and DefinitionPermissionOutput values. // You can construct a concrete instance of `DefinitionPermissionInput` via: // // DefinitionPermissionArgs{...} type DefinitionPermissionInput interface { pulumi.Input ToDefinitionPermissionOutput() DefinitionPermissionOutput ToDefinitionPermissionOutputWithContext(context.Context) DefinitionPermissionOutput } type DefinitionPermissionArgs struct { // One or more Allowed Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. Actions pulumi.StringArrayInput `pulumi:"actions"` // One or more Allowed Data Actions, such as `*`, `Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. DataActions pulumi.StringArrayInput `pulumi:"dataActions"` // One or more Disallowed Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. NotActions pulumi.StringArrayInput `pulumi:"notActions"` // One or more Disallowed Data Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. NotDataActions pulumi.StringArrayInput `pulumi:"notDataActions"` } func (DefinitionPermissionArgs) ElementType() reflect.Type { return reflect.TypeOf((*DefinitionPermission)(nil)).Elem() } func (i DefinitionPermissionArgs) ToDefinitionPermissionOutput() DefinitionPermissionOutput { return i.ToDefinitionPermissionOutputWithContext(context.Background()) } func (i DefinitionPermissionArgs) ToDefinitionPermissionOutputWithContext(ctx context.Context) DefinitionPermissionOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionPermissionOutput) } // DefinitionPermissionArrayInput is an input type that accepts DefinitionPermissionArray and DefinitionPermissionArrayOutput values. // You can construct a concrete instance of `DefinitionPermissionArrayInput` via: // // DefinitionPermissionArray{ DefinitionPermissionArgs{...} } type DefinitionPermissionArrayInput interface { pulumi.Input ToDefinitionPermissionArrayOutput() DefinitionPermissionArrayOutput ToDefinitionPermissionArrayOutputWithContext(context.Context) DefinitionPermissionArrayOutput } type DefinitionPermissionArray []DefinitionPermissionInput func (DefinitionPermissionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]DefinitionPermission)(nil)).Elem() } func (i DefinitionPermissionArray) ToDefinitionPermissionArrayOutput() DefinitionPermissionArrayOutput { return i.ToDefinitionPermissionArrayOutputWithContext(context.Background()) } func (i DefinitionPermissionArray) ToDefinitionPermissionArrayOutputWithContext(ctx context.Context) DefinitionPermissionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionPermissionArrayOutput) } type DefinitionPermissionOutput struct{ *pulumi.OutputState } func (DefinitionPermissionOutput) ElementType() reflect.Type { return reflect.TypeOf((*DefinitionPermission)(nil)).Elem() } func (o DefinitionPermissionOutput) ToDefinitionPermissionOutput() DefinitionPermissionOutput { return o } func (o DefinitionPermissionOutput) ToDefinitionPermissionOutputWithContext(ctx context.Context) DefinitionPermissionOutput { return o } // One or more Allowed Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. func (o DefinitionPermissionOutput) Actions() pulumi.StringArrayOutput { return o.ApplyT(func(v DefinitionPermission) []string { return v.Actions }).(pulumi.StringArrayOutput) } // One or more Allowed Data Actions, such as `*`, `Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. func (o DefinitionPermissionOutput) DataActions() pulumi.StringArrayOutput { return o.ApplyT(func(v DefinitionPermission) []string { return v.DataActions }).(pulumi.StringArrayOutput) } // One or more Disallowed Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. func (o DefinitionPermissionOutput) NotActions() pulumi.StringArrayOutput { return o.ApplyT(func(v DefinitionPermission) []string { return v.NotActions }).(pulumi.StringArrayOutput) } // One or more Disallowed Data Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/azure/role-based-access-control/resource-provider-operations) for details. func (o DefinitionPermissionOutput) NotDataActions() pulumi.StringArrayOutput { return o.ApplyT(func(v DefinitionPermission) []string { return v.NotDataActions }).(pulumi.StringArrayOutput) } type DefinitionPermissionArrayOutput struct{ *pulumi.OutputState } func (DefinitionPermissionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]DefinitionPermission)(nil)).Elem() } func (o DefinitionPermissionArrayOutput) ToDefinitionPermissionArrayOutput() DefinitionPermissionArrayOutput { return o } func (o DefinitionPermissionArrayOutput) ToDefinitionPermissionArrayOutputWithContext(ctx context.Context) DefinitionPermissionArrayOutput { return o } func (o DefinitionPermissionArrayOutput) Index(i pulumi.IntInput) DefinitionPermissionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) DefinitionPermission { return vs[0].([]DefinitionPermission)[vs[1].(int)] }).(DefinitionPermissionOutput) } type GetRoleDefinitionPermission struct { // A list of actions supported by this role. Actions []string `pulumi:"actions"` // The conditions on this role definition, which limits the resources it can be assigned to. Condition string `pulumi:"condition"` // The version of the condition. ConditionVersion string `pulumi:"conditionVersion"` // A list of data actions allowed by this role. DataActions []string `pulumi:"dataActions"` // A list of actions which are denied by this role. NotActions []string `pulumi:"notActions"` // A list of data actions which are denied by this role. NotDataActions []string `pulumi:"notDataActions"` } // GetRoleDefinitionPermissionInput is an input type that accepts GetRoleDefinitionPermissionArgs and GetRoleDefinitionPermissionOutput values. // You can construct a concrete instance of `GetRoleDefinitionPermissionInput` via: // // GetRoleDefinitionPermissionArgs{...} type GetRoleDefinitionPermissionInput interface { pulumi.Input ToGetRoleDefinitionPermissionOutput() GetRoleDefinitionPermissionOutput ToGetRoleDefinitionPermissionOutputWithContext(context.Context) GetRoleDefinitionPermissionOutput } type GetRoleDefinitionPermissionArgs struct { // A list of actions supported by this role. Actions pulumi.StringArrayInput `pulumi:"actions"` // The conditions on this role definition, which limits the resources it can be assigned to. Condition pulumi.StringInput `pulumi:"condition"` // The version of the condition. ConditionVersion pulumi.StringInput `pulumi:"conditionVersion"` // A list of data actions allowed by this role. DataActions pulumi.StringArrayInput `pulumi:"dataActions"` // A list of actions which are denied by this role. NotActions pulumi.StringArrayInput `pulumi:"notActions"` // A list of data actions which are denied by this role. NotDataActions pulumi.StringArrayInput `pulumi:"notDataActions"` } func (GetRoleDefinitionPermissionArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetRoleDefinitionPermission)(nil)).Elem() } func (i GetRoleDefinitionPermissionArgs) ToGetRoleDefinitionPermissionOutput() GetRoleDefinitionPermissionOutput { return i.ToGetRoleDefinitionPermissionOutputWithContext(context.Background()) } func (i GetRoleDefinitionPermissionArgs) ToGetRoleDefinitionPermissionOutputWithContext(ctx context.Context) GetRoleDefinitionPermissionOutput { return pulumi.ToOutputWithContext(ctx, i).(GetRoleDefinitionPermissionOutput) } // GetRoleDefinitionPermissionArrayInput is an input type that accepts GetRoleDefinitionPermissionArray and GetRoleDefinitionPermissionArrayOutput values. // You can construct a concrete instance of `GetRoleDefinitionPermissionArrayInput` via: // // GetRoleDefinitionPermissionArray{ GetRoleDefinitionPermissionArgs{...} } type GetRoleDefinitionPermissionArrayInput interface { pulumi.Input ToGetRoleDefinitionPermissionArrayOutput() GetRoleDefinitionPermissionArrayOutput ToGetRoleDefinitionPermissionArrayOutputWithContext(context.Context) GetRoleDefinitionPermissionArrayOutput } type GetRoleDefinitionPermissionArray []GetRoleDefinitionPermissionInput func (GetRoleDefinitionPermissionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]GetRoleDefinitionPermission)(nil)).Elem() } func (i GetRoleDefinitionPermissionArray) ToGetRoleDefinitionPermissionArrayOutput() GetRoleDefinitionPermissionArrayOutput { return i.ToGetRoleDefinitionPermissionArrayOutputWithContext(context.Background()) } func (i GetRoleDefinitionPermissionArray) ToGetRoleDefinitionPermissionArrayOutputWithContext(ctx context.Context) GetRoleDefinitionPermissionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GetRoleDefinitionPermissionArrayOutput) } type GetRoleDefinitionPermissionOutput struct{ *pulumi.OutputState } func (GetRoleDefinitionPermissionOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetRoleDefinitionPermission)(nil)).Elem() } func (o GetRoleDefinitionPermissionOutput) ToGetRoleDefinitionPermissionOutput() GetRoleDefinitionPermissionOutput { return o } func (o GetRoleDefinitionPermissionOutput) ToGetRoleDefinitionPermissionOutputWithContext(ctx context.Context) GetRoleDefinitionPermissionOutput { return o } // A list of actions supported by this role. func (o GetRoleDefinitionPermissionOutput) Actions() pulumi.StringArrayOutput { return o.ApplyT(func(v GetRoleDefinitionPermission) []string { return v.Actions }).(pulumi.StringArrayOutput) } // The conditions on this role definition, which limits the resources it can be assigned to. func (o GetRoleDefinitionPermissionOutput) Condition() pulumi.StringOutput { return o.ApplyT(func(v GetRoleDefinitionPermission) string { return v.Condition }).(pulumi.StringOutput) } // The version of the condition. func (o GetRoleDefinitionPermissionOutput) ConditionVersion() pulumi.StringOutput { return o.ApplyT(func(v GetRoleDefinitionPermission) string { return v.ConditionVersion }).(pulumi.StringOutput) } // A list of data actions allowed by this role. func (o GetRoleDefinitionPermissionOutput) DataActions() pulumi.StringArrayOutput { return o.ApplyT(func(v GetRoleDefinitionPermission) []string { return v.DataActions }).(pulumi.StringArrayOutput) } // A list of actions which are denied by this role. func (o GetRoleDefinitionPermissionOutput) NotActions() pulumi.StringArrayOutput { return o.ApplyT(func(v GetRoleDefinitionPermission) []string { return v.NotActions }).(pulumi.StringArrayOutput) } // A list of data actions which are denied by this role. func (o GetRoleDefinitionPermissionOutput) NotDataActions() pulumi.StringArrayOutput { return o.ApplyT(func(v GetRoleDefinitionPermission) []string { return v.NotDataActions }).(pulumi.StringArrayOutput) } type GetRoleDefinitionPermissionArrayOutput struct{ *pulumi.OutputState } func (GetRoleDefinitionPermissionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]GetRoleDefinitionPermission)(nil)).Elem() } func (o GetRoleDefinitionPermissionArrayOutput) ToGetRoleDefinitionPermissionArrayOutput() GetRoleDefinitionPermissionArrayOutput { return o } func (o GetRoleDefinitionPermissionArrayOutput) ToGetRoleDefinitionPermissionArrayOutputWithContext(ctx context.Context) GetRoleDefinitionPermissionArrayOutput { return o } func (o GetRoleDefinitionPermissionArrayOutput) Index(i pulumi.IntInput) GetRoleDefinitionPermissionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetRoleDefinitionPermission { return vs[0].([]GetRoleDefinitionPermission)[vs[1].(int)] }).(GetRoleDefinitionPermissionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DefinitionPermissionInput)(nil)).Elem(), DefinitionPermissionArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*DefinitionPermissionArrayInput)(nil)).Elem(), DefinitionPermissionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetRoleDefinitionPermissionInput)(nil)).Elem(), GetRoleDefinitionPermissionArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetRoleDefinitionPermissionArrayInput)(nil)).Elem(), GetRoleDefinitionPermissionArray{}) pulumi.RegisterOutputType(DefinitionPermissionOutput{}) pulumi.RegisterOutputType(DefinitionPermissionArrayOutput{}) pulumi.RegisterOutputType(GetRoleDefinitionPermissionOutput{}) pulumi.RegisterOutputType(GetRoleDefinitionPermissionArrayOutput{}) }
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/role/assignment.go
sdk/go/azure/role/assignment.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 role import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Assigns a given Principal (User or Group) to a given Role. // // ## Example Usage // // ### Using A Built-In Role) // // ```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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // primary, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // _, err = authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{ // Scope: pulumi.String(primary.Id), // RoleDefinitionName: pulumi.String("Reader"), // PrincipalId: pulumi.String(example.ObjectId), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Custom Role & Service Principal) // // ```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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // primary, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // exampleRoleDefinition, err := authorization.NewRoleDefinition(ctx, "example", &authorization.RoleDefinitionArgs{ // RoleDefinitionId: pulumi.String("00000000-0000-0000-0000-000000000000"), // Name: pulumi.String("my-custom-role-definition"), // Scope: pulumi.String(primary.Id), // Permissions: authorization.RoleDefinitionPermissionArray{ // &authorization.RoleDefinitionPermissionArgs{ // Actions: pulumi.StringArray{ // pulumi.String("Microsoft.Resources/subscriptions/resourceGroups/read"), // }, // NotActions: pulumi.StringArray{}, // }, // }, // AssignableScopes: pulumi.StringArray{ // pulumi.String(primary.Id), // }, // }) // if err != nil { // return err // } // _, err = authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{ // Name: pulumi.String("00000000-0000-0000-0000-000000000000"), // Scope: pulumi.String(primary.Id), // RoleDefinitionId: exampleRoleDefinition.RoleDefinitionResourceId, // PrincipalId: pulumi.String(example.ObjectId), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Custom Role & User) // // ```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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // primary, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // exampleRoleDefinition, err := authorization.NewRoleDefinition(ctx, "example", &authorization.RoleDefinitionArgs{ // RoleDefinitionId: pulumi.String("00000000-0000-0000-0000-000000000000"), // Name: pulumi.String("my-custom-role-definition"), // Scope: pulumi.String(primary.Id), // Permissions: authorization.RoleDefinitionPermissionArray{ // &authorization.RoleDefinitionPermissionArgs{ // Actions: pulumi.StringArray{ // pulumi.String("Microsoft.Resources/subscriptions/resourceGroups/read"), // }, // NotActions: pulumi.StringArray{}, // }, // }, // AssignableScopes: pulumi.StringArray{ // pulumi.String(primary.Id), // }, // }) // if err != nil { // return err // } // _, err = authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{ // Name: pulumi.String("00000000-0000-0000-0000-000000000000"), // Scope: pulumi.String(primary.Id), // RoleDefinitionId: exampleRoleDefinition.RoleDefinitionResourceId, // PrincipalId: pulumi.String(example.ObjectId), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Custom Role & Management Group) // // ```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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // primary, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // _, err = management.LookupGroup(ctx, &management.LookupGroupArgs{ // Name: pulumi.StringRef("00000000-0000-0000-0000-000000000000"), // }, nil) // if err != nil { // return err // } // exampleRoleDefinition, err := authorization.NewRoleDefinition(ctx, "example", &authorization.RoleDefinitionArgs{ // RoleDefinitionId: pulumi.String("00000000-0000-0000-0000-000000000000"), // Name: pulumi.String("my-custom-role-definition"), // Scope: pulumi.String(primary.Id), // Permissions: authorization.RoleDefinitionPermissionArray{ // &authorization.RoleDefinitionPermissionArgs{ // Actions: pulumi.StringArray{ // pulumi.String("Microsoft.Resources/subscriptions/resourceGroups/read"), // }, // NotActions: pulumi.StringArray{}, // }, // }, // AssignableScopes: pulumi.StringArray{ // pulumi.String(primary.Id), // }, // }) // if err != nil { // return err // } // _, err = authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{ // Name: pulumi.String("00000000-0000-0000-0000-000000000000"), // Scope: pulumi.Any(primaryAzurermManagementGroup.Id), // RoleDefinitionId: exampleRoleDefinition.RoleDefinitionResourceId, // PrincipalId: pulumi.String(example.ObjectId), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### ABAC Condition) // // ```go // package main // // import ( // // "fmt" // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "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 { // primary, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // builtin, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{ // Name: pulumi.StringRef("Reader"), // }, nil) // if err != nil { // return err // } // invokeBasename, err := std.Basename(ctx, &std.BasenameArgs{ // Input: builtin.RoleDefinitionId, // }, nil) // if err != nil { // return err // } // invokeBasename1, err := std.Basename(ctx, &std.BasenameArgs{ // Input: builtin.RoleDefinitionId, // }, nil) // if err != nil { // return err // } // _, err = authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{ // RoleDefinitionName: pulumi.String("Role Based Access Control Administrator"), // Scope: pulumi.String(primary.Id), // PrincipalId: pulumi.String(example.ObjectId), // PrincipalType: pulumi.String("ServicePrincipal"), // Description: pulumi.String("Role Based Access Control Administrator role assignment with ABAC Condition."), // ConditionVersion: pulumi.String("2.0"), // Condition: pulumi.Sprintf(`( // ( // !(ActionMatches{'Microsoft.Authorization/roleAssignments/write'}) // ) // OR // ( // @Request[Microsoft.Authorization/roleAssignments:RoleDefinitionId] ForAnyOfAnyValues:GuidEquals {%v} // ) // // ) // AND // ( // // ( // !(ActionMatches{'Microsoft.Authorization/roleAssignments/delete'}) // ) // OR // ( // @Resource[Microsoft.Authorization/roleAssignments:RoleDefinitionId] ForAnyOfAnyValues:GuidEquals {%v} // ) // // ) // `, invokeBasename.Result, invokeBasename1.Result), // // }) // 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.Authorization` - 2022-05-01-preview, 2022-04-01 // // ## Import // // Role Assignments can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:role/assignment:Assignment example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/00000000-0000-0000-0000-000000000000 // ``` // // * for scope `Subscription`, the id format is `/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/00000000-0000-0000-0000-000000000000` // // * for scope `Resource Group`, the id format is `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Authorization/roleAssignments/00000000-0000-0000-0000-000000000000` // // * for scope `Key Vault`, the id format is `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.KeyVault/vaults/vault1/providers/Microsoft.Authorization/roleAssignments/00000000-0000-0000-0000-000000000000` // // * for scope `Storage Account`, the id format is `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Storage/storageAccounts/storageAccount1/providers/Microsoft.Authorization/roleAssignments/00000000-0000-0000-0000-000000000000` // // text // // /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/00000000-0000-0000-0000-000000000000|00000000-0000-0000-0000-000000000000 // // Deprecated: azure.role.Assignment has been deprecated in favor of azure.authorization.Assignment type Assignment struct { pulumi.CustomResourceState // The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created. Condition pulumi.StringPtrOutput `pulumi:"condition"` // The version of the condition. Possible values are `1.0` or `2.0`. Changing this forces a new resource to be created. // // > **Note:** `condition` is required when `conditionVersion` is set. ConditionVersion pulumi.StringOutput `pulumi:"conditionVersion"` // The delegated Azure Resource Id which contains a Managed Identity. Changing this forces a new resource to be created. // // > **Note:** This field is only used in cross tenant scenarios. DelegatedManagedIdentityResourceId pulumi.StringPtrOutput `pulumi:"delegatedManagedIdentityResourceId"` // The description for this Role Assignment. Changing this forces a new resource to be created. Description pulumi.StringPtrOutput `pulumi:"description"` // A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created. // // > **Note:** The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). PrincipalId pulumi.StringOutput `pulumi:"principalId"` // The type of the `principalId`. Possible values are `User`, `Group` and `ServicePrincipal`. Changing this forces a new resource to be created. It is necessary to explicitly set this attribute when creating role assignments if the principal creating the assignment is constrained by ABAC rules that filters on the PrincipalType attribute. PrincipalType pulumi.StringOutput `pulumi:"principalType"` // The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. RoleDefinitionId pulumi.StringOutput `pulumi:"roleDefinitionId"` // The name of a built-in Role. Changing this forces a new resource to be created. // // > **Note:** Either `roleDefinitionId` or `roleDefinitionName` must be set. RoleDefinitionName pulumi.StringOutput `pulumi:"roleDefinitionName"` // The scope at which the Role Assignment applies to, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`, or `/providers/Microsoft.Management/managementGroups/myMG`. Changing this forces a new resource to be created. Scope pulumi.StringOutput `pulumi:"scope"` // If the `principalId` is a newly provisioned `Service Principal` set this value to `true` to skip the `Azure Active Directory` check which may fail due to replication lag. This argument is only valid if the `principalId` is a `Service Principal` identity. Defaults to `false`. // // > **Note:** If it is not a `Service Principal` identity it will cause the role assignment to fail. SkipServicePrincipalAadCheck pulumi.BoolOutput `pulumi:"skipServicePrincipalAadCheck"` } // NewAssignment registers a new resource with the given unique name, arguments, and options. func NewAssignment(ctx *pulumi.Context, name string, args *AssignmentArgs, opts ...pulumi.ResourceOption) (*Assignment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PrincipalId == nil { return nil, errors.New("invalid value for required argument 'PrincipalId'") } if args.Scope == nil { return nil, errors.New("invalid value for required argument 'Scope'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Assignment err := ctx.RegisterResource("azure:role/assignment:Assignment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAssignment gets an existing Assignment 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 GetAssignment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AssignmentState, opts ...pulumi.ResourceOption) (*Assignment, error) { var resource Assignment err := ctx.ReadResource("azure:role/assignment:Assignment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Assignment resources. type assignmentState struct { // The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created. Condition *string `pulumi:"condition"` // The version of the condition. Possible values are `1.0` or `2.0`. Changing this forces a new resource to be created. // // > **Note:** `condition` is required when `conditionVersion` is set. ConditionVersion *string `pulumi:"conditionVersion"` // The delegated Azure Resource Id which contains a Managed Identity. Changing this forces a new resource to be created. // // > **Note:** This field is only used in cross tenant scenarios. DelegatedManagedIdentityResourceId *string `pulumi:"delegatedManagedIdentityResourceId"` // The description for this Role Assignment. Changing this forces a new resource to be created. Description *string `pulumi:"description"` // A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created. // // > **Note:** The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). PrincipalId *string `pulumi:"principalId"` // The type of the `principalId`. Possible values are `User`, `Group` and `ServicePrincipal`. Changing this forces a new resource to be created. It is necessary to explicitly set this attribute when creating role assignments if the principal creating the assignment is constrained by ABAC rules that filters on the PrincipalType attribute. PrincipalType *string `pulumi:"principalType"` // The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. RoleDefinitionId *string `pulumi:"roleDefinitionId"` // The name of a built-in Role. Changing this forces a new resource to be created. // // > **Note:** Either `roleDefinitionId` or `roleDefinitionName` must be set. RoleDefinitionName *string `pulumi:"roleDefinitionName"` // The scope at which the Role Assignment applies to, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`, or `/providers/Microsoft.Management/managementGroups/myMG`. Changing this forces a new resource to be created. Scope *string `pulumi:"scope"` // If the `principalId` is a newly provisioned `Service Principal` set this value to `true` to skip the `Azure Active Directory` check which may fail due to replication lag. This argument is only valid if the `principalId` is a `Service Principal` identity. Defaults to `false`. // // > **Note:** If it is not a `Service Principal` identity it will cause the role assignment to fail. SkipServicePrincipalAadCheck *bool `pulumi:"skipServicePrincipalAadCheck"` } type AssignmentState struct { // The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created. Condition pulumi.StringPtrInput // The version of the condition. Possible values are `1.0` or `2.0`. Changing this forces a new resource to be created. // // > **Note:** `condition` is required when `conditionVersion` is set. ConditionVersion pulumi.StringPtrInput // The delegated Azure Resource Id which contains a Managed Identity. Changing this forces a new resource to be created. // // > **Note:** This field is only used in cross tenant scenarios. DelegatedManagedIdentityResourceId pulumi.StringPtrInput // The description for this Role Assignment. Changing this forces a new resource to be created. Description pulumi.StringPtrInput // A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created. // // > **Note:** The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). PrincipalId pulumi.StringPtrInput // The type of the `principalId`. Possible values are `User`, `Group` and `ServicePrincipal`. Changing this forces a new resource to be created. It is necessary to explicitly set this attribute when creating role assignments if the principal creating the assignment is constrained by ABAC rules that filters on the PrincipalType attribute. PrincipalType pulumi.StringPtrInput // The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. RoleDefinitionId pulumi.StringPtrInput // The name of a built-in Role. Changing this forces a new resource to be created. // // > **Note:** Either `roleDefinitionId` or `roleDefinitionName` must be set. RoleDefinitionName pulumi.StringPtrInput // The scope at which the Role Assignment applies to, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`, or `/providers/Microsoft.Management/managementGroups/myMG`. Changing this forces a new resource to be created. Scope pulumi.StringPtrInput // If the `principalId` is a newly provisioned `Service Principal` set this value to `true` to skip the `Azure Active Directory` check which may fail due to replication lag. This argument is only valid if the `principalId` is a `Service Principal` identity. Defaults to `false`. // // > **Note:** If it is not a `Service Principal` identity it will cause the role assignment to fail. SkipServicePrincipalAadCheck pulumi.BoolPtrInput } func (AssignmentState) ElementType() reflect.Type { return reflect.TypeOf((*assignmentState)(nil)).Elem() } type assignmentArgs struct { // The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created. Condition *string `pulumi:"condition"` // The version of the condition. Possible values are `1.0` or `2.0`. Changing this forces a new resource to be created. // // > **Note:** `condition` is required when `conditionVersion` is set. ConditionVersion *string `pulumi:"conditionVersion"` // The delegated Azure Resource Id which contains a Managed Identity. Changing this forces a new resource to be created. // // > **Note:** This field is only used in cross tenant scenarios. DelegatedManagedIdentityResourceId *string `pulumi:"delegatedManagedIdentityResourceId"` // The description for this Role Assignment. Changing this forces a new resource to be created. Description *string `pulumi:"description"` // A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created. // // > **Note:** The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). PrincipalId string `pulumi:"principalId"` // The type of the `principalId`. Possible values are `User`, `Group` and `ServicePrincipal`. Changing this forces a new resource to be created. It is necessary to explicitly set this attribute when creating role assignments if the principal creating the assignment is constrained by ABAC rules that filters on the PrincipalType attribute. PrincipalType *string `pulumi:"principalType"` // The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. RoleDefinitionId *string `pulumi:"roleDefinitionId"` // The name of a built-in Role. Changing this forces a new resource to be created. // // > **Note:** Either `roleDefinitionId` or `roleDefinitionName` must be set. RoleDefinitionName *string `pulumi:"roleDefinitionName"` // The scope at which the Role Assignment applies to, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`, or `/providers/Microsoft.Management/managementGroups/myMG`. Changing this forces a new resource to be created. Scope string `pulumi:"scope"` // If the `principalId` is a newly provisioned `Service Principal` set this value to `true` to skip the `Azure Active Directory` check which may fail due to replication lag. This argument is only valid if the `principalId` is a `Service Principal` identity. Defaults to `false`. // // > **Note:** If it is not a `Service Principal` identity it will cause the role assignment to fail. SkipServicePrincipalAadCheck *bool `pulumi:"skipServicePrincipalAadCheck"` } // The set of arguments for constructing a Assignment resource. type AssignmentArgs struct { // The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created. Condition pulumi.StringPtrInput // The version of the condition. Possible values are `1.0` or `2.0`. Changing this forces a new resource to be created. // // > **Note:** `condition` is required when `conditionVersion` is set. ConditionVersion pulumi.StringPtrInput // The delegated Azure Resource Id which contains a Managed Identity. Changing this forces a new resource to be created. // // > **Note:** This field is only used in cross tenant scenarios. DelegatedManagedIdentityResourceId pulumi.StringPtrInput // The description for this Role Assignment. Changing this forces a new resource to be created. Description pulumi.StringPtrInput // A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created. // // > **Note:** The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). PrincipalId pulumi.StringInput // The type of the `principalId`. Possible values are `User`, `Group` and `ServicePrincipal`. Changing this forces a new resource to be created. It is necessary to explicitly set this attribute when creating role assignments if the principal creating the assignment is constrained by ABAC rules that filters on the PrincipalType attribute. PrincipalType pulumi.StringPtrInput // The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. RoleDefinitionId pulumi.StringPtrInput // The name of a built-in Role. Changing this forces a new resource to be created. // // > **Note:** Either `roleDefinitionId` or `roleDefinitionName` must be set. RoleDefinitionName pulumi.StringPtrInput // The scope at which the Role Assignment applies to, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`, or `/providers/Microsoft.Management/managementGroups/myMG`. Changing this forces a new resource to be created. Scope pulumi.StringInput // If the `principalId` is a newly provisioned `Service Principal` set this value to `true` to skip the `Azure Active Directory` check which may fail due to replication lag. This argument is only valid if the `principalId` is a `Service Principal` identity. Defaults to `false`. // // > **Note:** If it is not a `Service Principal` identity it will cause the role assignment to fail. SkipServicePrincipalAadCheck pulumi.BoolPtrInput } func (AssignmentArgs) ElementType() reflect.Type { return reflect.TypeOf((*assignmentArgs)(nil)).Elem() } type AssignmentInput interface { pulumi.Input ToAssignmentOutput() AssignmentOutput ToAssignmentOutputWithContext(ctx context.Context) AssignmentOutput } func (*Assignment) ElementType() reflect.Type { return reflect.TypeOf((**Assignment)(nil)).Elem() } func (i *Assignment) ToAssignmentOutput() AssignmentOutput { return i.ToAssignmentOutputWithContext(context.Background()) } func (i *Assignment) ToAssignmentOutputWithContext(ctx context.Context) AssignmentOutput { return pulumi.ToOutputWithContext(ctx, i).(AssignmentOutput) } // AssignmentArrayInput is an input type that accepts AssignmentArray and AssignmentArrayOutput values. // You can construct a concrete instance of `AssignmentArrayInput` via: // // AssignmentArray{ AssignmentArgs{...} } type AssignmentArrayInput interface { pulumi.Input ToAssignmentArrayOutput() AssignmentArrayOutput ToAssignmentArrayOutputWithContext(context.Context) AssignmentArrayOutput } type AssignmentArray []AssignmentInput func (AssignmentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Assignment)(nil)).Elem() } func (i AssignmentArray) ToAssignmentArrayOutput() AssignmentArrayOutput { return i.ToAssignmentArrayOutputWithContext(context.Background()) } func (i AssignmentArray) ToAssignmentArrayOutputWithContext(ctx context.Context) AssignmentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AssignmentArrayOutput) } // AssignmentMapInput is an input type that accepts AssignmentMap and AssignmentMapOutput values. // You can construct a concrete instance of `AssignmentMapInput` via: // // AssignmentMap{ "key": AssignmentArgs{...} } type AssignmentMapInput interface { pulumi.Input ToAssignmentMapOutput() AssignmentMapOutput ToAssignmentMapOutputWithContext(context.Context) AssignmentMapOutput } type AssignmentMap map[string]AssignmentInput func (AssignmentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Assignment)(nil)).Elem() } func (i AssignmentMap) ToAssignmentMapOutput() AssignmentMapOutput { return i.ToAssignmentMapOutputWithContext(context.Background()) } func (i AssignmentMap) ToAssignmentMapOutputWithContext(ctx context.Context) AssignmentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AssignmentMapOutput) } type AssignmentOutput struct{ *pulumi.OutputState } func (AssignmentOutput) ElementType() reflect.Type { return reflect.TypeOf((**Assignment)(nil)).Elem() } func (o AssignmentOutput) ToAssignmentOutput() AssignmentOutput { return o } func (o AssignmentOutput) ToAssignmentOutputWithContext(ctx context.Context) AssignmentOutput { return o } // The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created. func (o AssignmentOutput) Condition() pulumi.StringPtrOutput { return o.ApplyT(func(v *Assignment) pulumi.StringPtrOutput { return v.Condition }).(pulumi.StringPtrOutput) } // The version of the condition. Possible values are `1.0` or `2.0`. Changing this forces a new resource to be created. // // > **Note:** `condition` is required when `conditionVersion` is set. func (o AssignmentOutput) ConditionVersion() pulumi.StringOutput { return o.ApplyT(func(v *Assignment) pulumi.StringOutput { return v.ConditionVersion }).(pulumi.StringOutput) } // The delegated Azure Resource Id which contains a Managed Identity. Changing this forces a new resource to be created. // // > **Note:** This field is only used in cross tenant scenarios. func (o AssignmentOutput) DelegatedManagedIdentityResourceId() pulumi.StringPtrOutput { return o.ApplyT(func(v *Assignment) pulumi.StringPtrOutput { return v.DelegatedManagedIdentityResourceId }).(pulumi.StringPtrOutput) } // The description for this Role Assignment. Changing this forces a new resource to be created. func (o AssignmentOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *Assignment) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. func (o AssignmentOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Assignment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created. // // > **Note:** The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). func (o AssignmentOutput) PrincipalId() pulumi.StringOutput { return o.ApplyT(func(v *Assignment) pulumi.StringOutput { return v.PrincipalId }).(pulumi.StringOutput) }
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/role/getRoleDefinition.go
sdk/go/azure/role/getRoleDefinition.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 role 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 Role Definition. // // ## 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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // primary, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // customRoleDefinition, err := authorization.NewRoleDefinition(ctx, "custom", &authorization.RoleDefinitionArgs{ // RoleDefinitionId: pulumi.String("00000000-0000-0000-0000-000000000000"), // Name: pulumi.String("CustomRoleDef"), // Scope: pulumi.String(primary.Id), // }) // if err != nil { // return err // } // custom := customRoleDefinition.RoleDefinitionId.ApplyT(func(roleDefinitionId string) (authorization.GetRoleDefinitionResult, error) { // return authorization.GetRoleDefinitionResult(authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{ // RoleDefinitionId: pulumi.StringRef(pulumi.StringRef(roleDefinitionId)), // Scope: pulumi.StringRef(pulumi.StringRef(primary.Id)), // }, nil)), nil // }).(authorization.GetRoleDefinitionResultOutput) // _ = customRoleDefinition.Name.ApplyT(func(name string) (authorization.GetRoleDefinitionResult, error) { // return authorization.GetRoleDefinitionResult(authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{ // Name: pulumi.StringRef(pulumi.StringRef(name)), // Scope: pulumi.StringRef(pulumi.StringRef(primary.Id)), // }, nil)), nil // }).(authorization.GetRoleDefinitionResultOutput) // builtin, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{ // Name: pulumi.StringRef("Contributor"), // }, nil) // if err != nil { // return err // } // ctx.Export("customRoleDefinitionId", custom.Id) // ctx.Export("contributorRoleDefinitionId", builtin.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Authorization` - 2022-05-01-preview // // Deprecated: azure.role.getRoleDefinition has been deprecated in favor of azure.authorization.getRoleDefinition func GetRoleDefinition(ctx *pulumi.Context, args *GetRoleDefinitionArgs, opts ...pulumi.InvokeOption) (*GetRoleDefinitionResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetRoleDefinitionResult err := ctx.Invoke("azure:role/getRoleDefinition:getRoleDefinition", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getRoleDefinition. type GetRoleDefinitionArgs struct { // Specifies the Name of either a built-in or custom Role Definition. // // > **Note:** You can also use this for built-in roles such as `Contributor`, `Owner`, `Reader` and `Virtual Machine Contributor` Name *string `pulumi:"name"` // Specifies the ID of the Role Definition as a UUID/GUID. RoleDefinitionId *string `pulumi:"roleDefinitionId"` // Specifies the Scope at which the Custom Role Definition exists. // // > **Note:** One of `name` or `roleDefinitionId` must be specified. Scope *string `pulumi:"scope"` } // A collection of values returned by getRoleDefinition. type GetRoleDefinitionResult struct { // One or more assignable scopes for this Role Definition, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. AssignableScopes []string `pulumi:"assignableScopes"` // The Description of the built-in Role. Description string `pulumi:"description"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` // A `permissions` block as documented below. Permissions []GetRoleDefinitionPermission `pulumi:"permissions"` RoleDefinitionId string `pulumi:"roleDefinitionId"` Scope *string `pulumi:"scope"` // The Type of the Role. Type string `pulumi:"type"` } func GetRoleDefinitionOutput(ctx *pulumi.Context, args GetRoleDefinitionOutputArgs, opts ...pulumi.InvokeOption) GetRoleDefinitionResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetRoleDefinitionResultOutput, error) { args := v.(GetRoleDefinitionArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:role/getRoleDefinition:getRoleDefinition", args, GetRoleDefinitionResultOutput{}, options).(GetRoleDefinitionResultOutput), nil }).(GetRoleDefinitionResultOutput) } // A collection of arguments for invoking getRoleDefinition. type GetRoleDefinitionOutputArgs struct { // Specifies the Name of either a built-in or custom Role Definition. // // > **Note:** You can also use this for built-in roles such as `Contributor`, `Owner`, `Reader` and `Virtual Machine Contributor` Name pulumi.StringPtrInput `pulumi:"name"` // Specifies the ID of the Role Definition as a UUID/GUID. RoleDefinitionId pulumi.StringPtrInput `pulumi:"roleDefinitionId"` // Specifies the Scope at which the Custom Role Definition exists. // // > **Note:** One of `name` or `roleDefinitionId` must be specified. Scope pulumi.StringPtrInput `pulumi:"scope"` } func (GetRoleDefinitionOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetRoleDefinitionArgs)(nil)).Elem() } // A collection of values returned by getRoleDefinition. type GetRoleDefinitionResultOutput struct{ *pulumi.OutputState } func (GetRoleDefinitionResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetRoleDefinitionResult)(nil)).Elem() } func (o GetRoleDefinitionResultOutput) ToGetRoleDefinitionResultOutput() GetRoleDefinitionResultOutput { return o } func (o GetRoleDefinitionResultOutput) ToGetRoleDefinitionResultOutputWithContext(ctx context.Context) GetRoleDefinitionResultOutput { return o } // One or more assignable scopes for this Role Definition, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. func (o GetRoleDefinitionResultOutput) AssignableScopes() pulumi.StringArrayOutput { return o.ApplyT(func(v GetRoleDefinitionResult) []string { return v.AssignableScopes }).(pulumi.StringArrayOutput) } // The Description of the built-in Role. func (o GetRoleDefinitionResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v GetRoleDefinitionResult) string { return v.Description }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetRoleDefinitionResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetRoleDefinitionResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetRoleDefinitionResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetRoleDefinitionResult) string { return v.Name }).(pulumi.StringOutput) } // A `permissions` block as documented below. func (o GetRoleDefinitionResultOutput) Permissions() GetRoleDefinitionPermissionArrayOutput { return o.ApplyT(func(v GetRoleDefinitionResult) []GetRoleDefinitionPermission { return v.Permissions }).(GetRoleDefinitionPermissionArrayOutput) } func (o GetRoleDefinitionResultOutput) RoleDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v GetRoleDefinitionResult) string { return v.RoleDefinitionId }).(pulumi.StringOutput) } func (o GetRoleDefinitionResultOutput) Scope() pulumi.StringPtrOutput { return o.ApplyT(func(v GetRoleDefinitionResult) *string { return v.Scope }).(pulumi.StringPtrOutput) } // The Type of the Role. func (o GetRoleDefinitionResultOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v GetRoleDefinitionResult) string { return v.Type }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetRoleDefinitionResultOutput{}) }
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/role/definition.go
sdk/go/azure/role/definition.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 role import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a custom Role Definition, used to assign Roles to Users/Principals. See ['Understand role definitions'](https://docs.microsoft.com/azure/role-based-access-control/role-definitions) in the Azure documentation for more details. // // ## 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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // primary, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // _, err = authorization.NewRoleDefinition(ctx, "example", &authorization.RoleDefinitionArgs{ // Name: pulumi.String("my-custom-role"), // Scope: pulumi.String(primary.Id), // Description: pulumi.String("This is a custom role created"), // Permissions: authorization.RoleDefinitionPermissionArray{ // &authorization.RoleDefinitionPermissionArgs{ // Actions: pulumi.StringArray{ // pulumi.String("*"), // }, // NotActions: pulumi.StringArray{}, // }, // }, // AssignableScopes: pulumi.StringArray{ // pulumi.String(primary.Id), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### With Management Group // ```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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // example, err := management.NewGroup(ctx, "example", &management.GroupArgs{ // DisplayName: pulumi.String("ParentGroup"), // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.SubscriptionId), // }, // }) // if err != nil { // return err // } // _, err = authorization.NewRoleDefinition(ctx, "example", &authorization.RoleDefinitionArgs{ // Name: pulumi.String("example-mg-role"), // Scope: example.ID(), // Description: pulumi.String("Example custom role scoped to a management group."), // Permissions: authorization.RoleDefinitionPermissionArray{ // &authorization.RoleDefinitionPermissionArgs{ // Actions: pulumi.StringArray{ // pulumi.String("Microsoft.Insights/alertRules/*"), // }, // NotActions: pulumi.StringArray{}, // }, // }, // AssignableScopes: pulumi.StringArray{ // example.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.Authorization` - 2022-05-01-preview // // ## Import // // Role Definitions can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:role/definition:Definition example "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/00000000-0000-0000-0000-000000000000|/subscriptions/00000000-0000-0000-0000-000000000000" // ``` // // Deprecated: azure.role.Definition has been deprecated in favor of azure.authorization.RoleDefinition type Definition struct { pulumi.CustomResourceState // One or more assignable scopes for this Role Definition, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, `/providers/Microsoft.Management/managementGroups/0b1f6471-1bf0-4dda-aec3-111122223333` , or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. // // > **NOTE:** The value for `scope` is automatically included in this list if no other values supplied. AssignableScopes pulumi.StringArrayOutput `pulumi:"assignableScopes"` // A description of the Role Definition. Description pulumi.StringPtrOutput `pulumi:"description"` // The name of the Role Definition. Name pulumi.StringOutput `pulumi:"name"` // A `permissions` block as defined below. Permissions DefinitionPermissionArrayOutput `pulumi:"permissions"` // A unique UUID/GUID which identifies this role - one will be generated if not specified. Changing this forces a new resource to be created. RoleDefinitionId pulumi.StringOutput `pulumi:"roleDefinitionId"` // The Azure Resource Manager ID for the resource. RoleDefinitionResourceId pulumi.StringOutput `pulumi:"roleDefinitionResourceId"` // The scope at which the Role Definition applies to, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, `/providers/Microsoft.Management/managementGroups/0b1f6471-1bf0-4dda-aec3-111122223333`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. It is recommended to use the first entry of the `assignableScopes`. Changing this forces a new resource to be created. Scope pulumi.StringOutput `pulumi:"scope"` } // NewDefinition registers a new resource with the given unique name, arguments, and options. func NewDefinition(ctx *pulumi.Context, name string, args *DefinitionArgs, opts ...pulumi.ResourceOption) (*Definition, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Scope == nil { return nil, errors.New("invalid value for required argument 'Scope'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Definition err := ctx.RegisterResource("azure:role/definition:Definition", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDefinition gets an existing Definition 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 GetDefinition(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DefinitionState, opts ...pulumi.ResourceOption) (*Definition, error) { var resource Definition err := ctx.ReadResource("azure:role/definition:Definition", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Definition resources. type definitionState struct { // One or more assignable scopes for this Role Definition, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, `/providers/Microsoft.Management/managementGroups/0b1f6471-1bf0-4dda-aec3-111122223333` , or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. // // > **NOTE:** The value for `scope` is automatically included in this list if no other values supplied. AssignableScopes []string `pulumi:"assignableScopes"` // A description of the Role Definition. Description *string `pulumi:"description"` // The name of the Role Definition. Name *string `pulumi:"name"` // A `permissions` block as defined below. Permissions []DefinitionPermission `pulumi:"permissions"` // A unique UUID/GUID which identifies this role - one will be generated if not specified. Changing this forces a new resource to be created. RoleDefinitionId *string `pulumi:"roleDefinitionId"` // The Azure Resource Manager ID for the resource. RoleDefinitionResourceId *string `pulumi:"roleDefinitionResourceId"` // The scope at which the Role Definition applies to, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, `/providers/Microsoft.Management/managementGroups/0b1f6471-1bf0-4dda-aec3-111122223333`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. It is recommended to use the first entry of the `assignableScopes`. Changing this forces a new resource to be created. Scope *string `pulumi:"scope"` } type DefinitionState struct { // One or more assignable scopes for this Role Definition, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, `/providers/Microsoft.Management/managementGroups/0b1f6471-1bf0-4dda-aec3-111122223333` , or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. // // > **NOTE:** The value for `scope` is automatically included in this list if no other values supplied. AssignableScopes pulumi.StringArrayInput // A description of the Role Definition. Description pulumi.StringPtrInput // The name of the Role Definition. Name pulumi.StringPtrInput // A `permissions` block as defined below. Permissions DefinitionPermissionArrayInput // A unique UUID/GUID which identifies this role - one will be generated if not specified. Changing this forces a new resource to be created. RoleDefinitionId pulumi.StringPtrInput // The Azure Resource Manager ID for the resource. RoleDefinitionResourceId pulumi.StringPtrInput // The scope at which the Role Definition applies to, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, `/providers/Microsoft.Management/managementGroups/0b1f6471-1bf0-4dda-aec3-111122223333`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. It is recommended to use the first entry of the `assignableScopes`. Changing this forces a new resource to be created. Scope pulumi.StringPtrInput } func (DefinitionState) ElementType() reflect.Type { return reflect.TypeOf((*definitionState)(nil)).Elem() } type definitionArgs struct { // One or more assignable scopes for this Role Definition, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, `/providers/Microsoft.Management/managementGroups/0b1f6471-1bf0-4dda-aec3-111122223333` , or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. // // > **NOTE:** The value for `scope` is automatically included in this list if no other values supplied. AssignableScopes []string `pulumi:"assignableScopes"` // A description of the Role Definition. Description *string `pulumi:"description"` // The name of the Role Definition. Name *string `pulumi:"name"` // A `permissions` block as defined below. Permissions []DefinitionPermission `pulumi:"permissions"` // A unique UUID/GUID which identifies this role - one will be generated if not specified. Changing this forces a new resource to be created. RoleDefinitionId *string `pulumi:"roleDefinitionId"` // The scope at which the Role Definition applies to, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, `/providers/Microsoft.Management/managementGroups/0b1f6471-1bf0-4dda-aec3-111122223333`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. It is recommended to use the first entry of the `assignableScopes`. Changing this forces a new resource to be created. Scope string `pulumi:"scope"` } // The set of arguments for constructing a Definition resource. type DefinitionArgs struct { // One or more assignable scopes for this Role Definition, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, `/providers/Microsoft.Management/managementGroups/0b1f6471-1bf0-4dda-aec3-111122223333` , or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. // // > **NOTE:** The value for `scope` is automatically included in this list if no other values supplied. AssignableScopes pulumi.StringArrayInput // A description of the Role Definition. Description pulumi.StringPtrInput // The name of the Role Definition. Name pulumi.StringPtrInput // A `permissions` block as defined below. Permissions DefinitionPermissionArrayInput // A unique UUID/GUID which identifies this role - one will be generated if not specified. Changing this forces a new resource to be created. RoleDefinitionId pulumi.StringPtrInput // The scope at which the Role Definition applies to, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, `/providers/Microsoft.Management/managementGroups/0b1f6471-1bf0-4dda-aec3-111122223333`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. It is recommended to use the first entry of the `assignableScopes`. Changing this forces a new resource to be created. Scope pulumi.StringInput } func (DefinitionArgs) ElementType() reflect.Type { return reflect.TypeOf((*definitionArgs)(nil)).Elem() } type DefinitionInput interface { pulumi.Input ToDefinitionOutput() DefinitionOutput ToDefinitionOutputWithContext(ctx context.Context) DefinitionOutput } func (*Definition) ElementType() reflect.Type { return reflect.TypeOf((**Definition)(nil)).Elem() } func (i *Definition) ToDefinitionOutput() DefinitionOutput { return i.ToDefinitionOutputWithContext(context.Background()) } func (i *Definition) ToDefinitionOutputWithContext(ctx context.Context) DefinitionOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionOutput) } // DefinitionArrayInput is an input type that accepts DefinitionArray and DefinitionArrayOutput values. // You can construct a concrete instance of `DefinitionArrayInput` via: // // DefinitionArray{ DefinitionArgs{...} } type DefinitionArrayInput interface { pulumi.Input ToDefinitionArrayOutput() DefinitionArrayOutput ToDefinitionArrayOutputWithContext(context.Context) DefinitionArrayOutput } type DefinitionArray []DefinitionInput func (DefinitionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Definition)(nil)).Elem() } func (i DefinitionArray) ToDefinitionArrayOutput() DefinitionArrayOutput { return i.ToDefinitionArrayOutputWithContext(context.Background()) } func (i DefinitionArray) ToDefinitionArrayOutputWithContext(ctx context.Context) DefinitionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionArrayOutput) } // DefinitionMapInput is an input type that accepts DefinitionMap and DefinitionMapOutput values. // You can construct a concrete instance of `DefinitionMapInput` via: // // DefinitionMap{ "key": DefinitionArgs{...} } type DefinitionMapInput interface { pulumi.Input ToDefinitionMapOutput() DefinitionMapOutput ToDefinitionMapOutputWithContext(context.Context) DefinitionMapOutput } type DefinitionMap map[string]DefinitionInput func (DefinitionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Definition)(nil)).Elem() } func (i DefinitionMap) ToDefinitionMapOutput() DefinitionMapOutput { return i.ToDefinitionMapOutputWithContext(context.Background()) } func (i DefinitionMap) ToDefinitionMapOutputWithContext(ctx context.Context) DefinitionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionMapOutput) } type DefinitionOutput struct{ *pulumi.OutputState } func (DefinitionOutput) ElementType() reflect.Type { return reflect.TypeOf((**Definition)(nil)).Elem() } func (o DefinitionOutput) ToDefinitionOutput() DefinitionOutput { return o } func (o DefinitionOutput) ToDefinitionOutputWithContext(ctx context.Context) DefinitionOutput { return o } // One or more assignable scopes for this Role Definition, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, `/providers/Microsoft.Management/managementGroups/0b1f6471-1bf0-4dda-aec3-111122223333` , or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. // // > **NOTE:** The value for `scope` is automatically included in this list if no other values supplied. func (o DefinitionOutput) AssignableScopes() pulumi.StringArrayOutput { return o.ApplyT(func(v *Definition) pulumi.StringArrayOutput { return v.AssignableScopes }).(pulumi.StringArrayOutput) } // A description of the Role Definition. func (o DefinitionOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *Definition) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The name of the Role Definition. func (o DefinitionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Definition) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A `permissions` block as defined below. func (o DefinitionOutput) Permissions() DefinitionPermissionArrayOutput { return o.ApplyT(func(v *Definition) DefinitionPermissionArrayOutput { return v.Permissions }).(DefinitionPermissionArrayOutput) } // A unique UUID/GUID which identifies this role - one will be generated if not specified. Changing this forces a new resource to be created. func (o DefinitionOutput) RoleDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v *Definition) pulumi.StringOutput { return v.RoleDefinitionId }).(pulumi.StringOutput) } // The Azure Resource Manager ID for the resource. func (o DefinitionOutput) RoleDefinitionResourceId() pulumi.StringOutput { return o.ApplyT(func(v *Definition) pulumi.StringOutput { return v.RoleDefinitionResourceId }).(pulumi.StringOutput) } // The scope at which the Role Definition applies to, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, `/providers/Microsoft.Management/managementGroups/0b1f6471-1bf0-4dda-aec3-111122223333`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. It is recommended to use the first entry of the `assignableScopes`. Changing this forces a new resource to be created. func (o DefinitionOutput) Scope() pulumi.StringOutput { return o.ApplyT(func(v *Definition) pulumi.StringOutput { return v.Scope }).(pulumi.StringOutput) } type DefinitionArrayOutput struct{ *pulumi.OutputState } func (DefinitionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Definition)(nil)).Elem() } func (o DefinitionArrayOutput) ToDefinitionArrayOutput() DefinitionArrayOutput { return o } func (o DefinitionArrayOutput) ToDefinitionArrayOutputWithContext(ctx context.Context) DefinitionArrayOutput { return o } func (o DefinitionArrayOutput) Index(i pulumi.IntInput) DefinitionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Definition { return vs[0].([]*Definition)[vs[1].(int)] }).(DefinitionOutput) } type DefinitionMapOutput struct{ *pulumi.OutputState } func (DefinitionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Definition)(nil)).Elem() } func (o DefinitionMapOutput) ToDefinitionMapOutput() DefinitionMapOutput { return o } func (o DefinitionMapOutput) ToDefinitionMapOutputWithContext(ctx context.Context) DefinitionMapOutput { return o } func (o DefinitionMapOutput) MapIndex(k pulumi.StringInput) DefinitionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Definition { return vs[0].(map[string]*Definition)[vs[1].(string)] }).(DefinitionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DefinitionInput)(nil)).Elem(), &Definition{}) pulumi.RegisterInputType(reflect.TypeOf((*DefinitionArrayInput)(nil)).Elem(), DefinitionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DefinitionMapInput)(nil)).Elem(), DefinitionMap{}) pulumi.RegisterOutputType(DefinitionOutput{}) pulumi.RegisterOutputType(DefinitionArrayOutput{}) pulumi.RegisterOutputType(DefinitionMapOutput{}) }
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/aadb2c/init.go
sdk/go/azure/aadb2c/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 aadb2c 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:aadb2c/directory:Directory": r = &Directory{} 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", "aadb2c/directory", &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/aadb2c/directory.go
sdk/go/azure/aadb2c/directory.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 aadb2c import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an AAD B2C Directory. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/aadb2c" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := aadb2c.NewDirectory(ctx, "example", &aadb2c.DirectoryArgs{ // CountryCode: pulumi.String("US"), // DataResidencyLocation: pulumi.String("United States"), // DisplayName: pulumi.String("example-b2c-tenant"), // DomainName: pulumi.String("exampleb2ctenant.onmicrosoft.com"), // ResourceGroupName: pulumi.String("example-rg"), // SkuName: pulumi.String("PremiumP1"), // }) // 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.AzureActiveDirectory` - 2021-04-01-preview // // ## Import // // AAD B2C Directories can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:aadb2c/directory:Directory example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.AzureActiveDirectory/b2cDirectories/directory-name // ``` type Directory struct { pulumi.CustomResourceState // The type of billing for the AAD B2C tenant. Possible values include: `MAU` or `Auths`. BillingType pulumi.StringOutput `pulumi:"billingType"` // Country code of the B2C tenant. The `countryCode` should be valid for the specified `dataResidencyLocation`. See [official docs](https://aka.ms/B2CDataResidency) for valid country codes. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created. CountryCode pulumi.StringOutput `pulumi:"countryCode"` // Location in which the B2C tenant is hosted and data resides. The `dataResidencyLocation` should be valid for the specified `countryCode`. See [official docs](https://aka.ms/B2CDataResidenc) for more information. Changing this forces a new AAD B2C Directory to be created. Possible values are `Asia Pacific`, `Australia`, `Europe`, `Global` and `United States`. DataResidencyLocation pulumi.StringOutput `pulumi:"dataResidencyLocation"` // The initial display name of the B2C tenant. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created. DisplayName pulumi.StringOutput `pulumi:"displayName"` // Domain name of the B2C tenant, including the `.onmicrosoft.com` suffix. Changing this forces a new AAD B2C Directory to be created. DomainName pulumi.StringOutput `pulumi:"domainName"` // The date from which the billing type took effect. May not be populated until after the first billing cycle. EffectiveStartDate pulumi.StringOutput `pulumi:"effectiveStartDate"` // The name of the Resource Group where the AAD B2C Directory should exist. Changing this forces a new AAD B2C Directory to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Billing SKU for the B2C tenant. Must be one of: `PremiumP1` or `PremiumP2` (`Standard` is not supported). See [official docs](https://aka.ms/b2cBilling) for more information. SkuName pulumi.StringOutput `pulumi:"skuName"` // A mapping of tags which should be assigned to the AAD B2C Directory. Tags pulumi.StringMapOutput `pulumi:"tags"` // The Tenant ID for the AAD B2C tenant. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewDirectory registers a new resource with the given unique name, arguments, and options. func NewDirectory(ctx *pulumi.Context, name string, args *DirectoryArgs, opts ...pulumi.ResourceOption) (*Directory, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DataResidencyLocation == nil { return nil, errors.New("invalid value for required argument 'DataResidencyLocation'") } if args.DomainName == nil { return nil, errors.New("invalid value for required argument 'DomainName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.SkuName == nil { return nil, errors.New("invalid value for required argument 'SkuName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Directory err := ctx.RegisterResource("azure:aadb2c/directory:Directory", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDirectory gets an existing Directory 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 GetDirectory(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DirectoryState, opts ...pulumi.ResourceOption) (*Directory, error) { var resource Directory err := ctx.ReadResource("azure:aadb2c/directory:Directory", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Directory resources. type directoryState struct { // The type of billing for the AAD B2C tenant. Possible values include: `MAU` or `Auths`. BillingType *string `pulumi:"billingType"` // Country code of the B2C tenant. The `countryCode` should be valid for the specified `dataResidencyLocation`. See [official docs](https://aka.ms/B2CDataResidency) for valid country codes. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created. CountryCode *string `pulumi:"countryCode"` // Location in which the B2C tenant is hosted and data resides. The `dataResidencyLocation` should be valid for the specified `countryCode`. See [official docs](https://aka.ms/B2CDataResidenc) for more information. Changing this forces a new AAD B2C Directory to be created. Possible values are `Asia Pacific`, `Australia`, `Europe`, `Global` and `United States`. DataResidencyLocation *string `pulumi:"dataResidencyLocation"` // The initial display name of the B2C tenant. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created. DisplayName *string `pulumi:"displayName"` // Domain name of the B2C tenant, including the `.onmicrosoft.com` suffix. Changing this forces a new AAD B2C Directory to be created. DomainName *string `pulumi:"domainName"` // The date from which the billing type took effect. May not be populated until after the first billing cycle. EffectiveStartDate *string `pulumi:"effectiveStartDate"` // The name of the Resource Group where the AAD B2C Directory should exist. Changing this forces a new AAD B2C Directory to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Billing SKU for the B2C tenant. Must be one of: `PremiumP1` or `PremiumP2` (`Standard` is not supported). See [official docs](https://aka.ms/b2cBilling) for more information. SkuName *string `pulumi:"skuName"` // A mapping of tags which should be assigned to the AAD B2C Directory. Tags map[string]string `pulumi:"tags"` // The Tenant ID for the AAD B2C tenant. TenantId *string `pulumi:"tenantId"` } type DirectoryState struct { // The type of billing for the AAD B2C tenant. Possible values include: `MAU` or `Auths`. BillingType pulumi.StringPtrInput // Country code of the B2C tenant. The `countryCode` should be valid for the specified `dataResidencyLocation`. See [official docs](https://aka.ms/B2CDataResidency) for valid country codes. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created. CountryCode pulumi.StringPtrInput // Location in which the B2C tenant is hosted and data resides. The `dataResidencyLocation` should be valid for the specified `countryCode`. See [official docs](https://aka.ms/B2CDataResidenc) for more information. Changing this forces a new AAD B2C Directory to be created. Possible values are `Asia Pacific`, `Australia`, `Europe`, `Global` and `United States`. DataResidencyLocation pulumi.StringPtrInput // The initial display name of the B2C tenant. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created. DisplayName pulumi.StringPtrInput // Domain name of the B2C tenant, including the `.onmicrosoft.com` suffix. Changing this forces a new AAD B2C Directory to be created. DomainName pulumi.StringPtrInput // The date from which the billing type took effect. May not be populated until after the first billing cycle. EffectiveStartDate pulumi.StringPtrInput // The name of the Resource Group where the AAD B2C Directory should exist. Changing this forces a new AAD B2C Directory to be created. ResourceGroupName pulumi.StringPtrInput // Billing SKU for the B2C tenant. Must be one of: `PremiumP1` or `PremiumP2` (`Standard` is not supported). See [official docs](https://aka.ms/b2cBilling) for more information. SkuName pulumi.StringPtrInput // A mapping of tags which should be assigned to the AAD B2C Directory. Tags pulumi.StringMapInput // The Tenant ID for the AAD B2C tenant. TenantId pulumi.StringPtrInput } func (DirectoryState) ElementType() reflect.Type { return reflect.TypeOf((*directoryState)(nil)).Elem() } type directoryArgs struct { // Country code of the B2C tenant. The `countryCode` should be valid for the specified `dataResidencyLocation`. See [official docs](https://aka.ms/B2CDataResidency) for valid country codes. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created. CountryCode *string `pulumi:"countryCode"` // Location in which the B2C tenant is hosted and data resides. The `dataResidencyLocation` should be valid for the specified `countryCode`. See [official docs](https://aka.ms/B2CDataResidenc) for more information. Changing this forces a new AAD B2C Directory to be created. Possible values are `Asia Pacific`, `Australia`, `Europe`, `Global` and `United States`. DataResidencyLocation string `pulumi:"dataResidencyLocation"` // The initial display name of the B2C tenant. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created. DisplayName *string `pulumi:"displayName"` // Domain name of the B2C tenant, including the `.onmicrosoft.com` suffix. Changing this forces a new AAD B2C Directory to be created. DomainName string `pulumi:"domainName"` // The name of the Resource Group where the AAD B2C Directory should exist. Changing this forces a new AAD B2C Directory to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Billing SKU for the B2C tenant. Must be one of: `PremiumP1` or `PremiumP2` (`Standard` is not supported). See [official docs](https://aka.ms/b2cBilling) for more information. SkuName string `pulumi:"skuName"` // A mapping of tags which should be assigned to the AAD B2C Directory. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Directory resource. type DirectoryArgs struct { // Country code of the B2C tenant. The `countryCode` should be valid for the specified `dataResidencyLocation`. See [official docs](https://aka.ms/B2CDataResidency) for valid country codes. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created. CountryCode pulumi.StringPtrInput // Location in which the B2C tenant is hosted and data resides. The `dataResidencyLocation` should be valid for the specified `countryCode`. See [official docs](https://aka.ms/B2CDataResidenc) for more information. Changing this forces a new AAD B2C Directory to be created. Possible values are `Asia Pacific`, `Australia`, `Europe`, `Global` and `United States`. DataResidencyLocation pulumi.StringInput // The initial display name of the B2C tenant. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created. DisplayName pulumi.StringPtrInput // Domain name of the B2C tenant, including the `.onmicrosoft.com` suffix. Changing this forces a new AAD B2C Directory to be created. DomainName pulumi.StringInput // The name of the Resource Group where the AAD B2C Directory should exist. Changing this forces a new AAD B2C Directory to be created. ResourceGroupName pulumi.StringInput // Billing SKU for the B2C tenant. Must be one of: `PremiumP1` or `PremiumP2` (`Standard` is not supported). See [official docs](https://aka.ms/b2cBilling) for more information. SkuName pulumi.StringInput // A mapping of tags which should be assigned to the AAD B2C Directory. Tags pulumi.StringMapInput } func (DirectoryArgs) ElementType() reflect.Type { return reflect.TypeOf((*directoryArgs)(nil)).Elem() } type DirectoryInput interface { pulumi.Input ToDirectoryOutput() DirectoryOutput ToDirectoryOutputWithContext(ctx context.Context) DirectoryOutput } func (*Directory) ElementType() reflect.Type { return reflect.TypeOf((**Directory)(nil)).Elem() } func (i *Directory) ToDirectoryOutput() DirectoryOutput { return i.ToDirectoryOutputWithContext(context.Background()) } func (i *Directory) ToDirectoryOutputWithContext(ctx context.Context) DirectoryOutput { return pulumi.ToOutputWithContext(ctx, i).(DirectoryOutput) } // DirectoryArrayInput is an input type that accepts DirectoryArray and DirectoryArrayOutput values. // You can construct a concrete instance of `DirectoryArrayInput` via: // // DirectoryArray{ DirectoryArgs{...} } type DirectoryArrayInput interface { pulumi.Input ToDirectoryArrayOutput() DirectoryArrayOutput ToDirectoryArrayOutputWithContext(context.Context) DirectoryArrayOutput } type DirectoryArray []DirectoryInput func (DirectoryArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Directory)(nil)).Elem() } func (i DirectoryArray) ToDirectoryArrayOutput() DirectoryArrayOutput { return i.ToDirectoryArrayOutputWithContext(context.Background()) } func (i DirectoryArray) ToDirectoryArrayOutputWithContext(ctx context.Context) DirectoryArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DirectoryArrayOutput) } // DirectoryMapInput is an input type that accepts DirectoryMap and DirectoryMapOutput values. // You can construct a concrete instance of `DirectoryMapInput` via: // // DirectoryMap{ "key": DirectoryArgs{...} } type DirectoryMapInput interface { pulumi.Input ToDirectoryMapOutput() DirectoryMapOutput ToDirectoryMapOutputWithContext(context.Context) DirectoryMapOutput } type DirectoryMap map[string]DirectoryInput func (DirectoryMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Directory)(nil)).Elem() } func (i DirectoryMap) ToDirectoryMapOutput() DirectoryMapOutput { return i.ToDirectoryMapOutputWithContext(context.Background()) } func (i DirectoryMap) ToDirectoryMapOutputWithContext(ctx context.Context) DirectoryMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DirectoryMapOutput) } type DirectoryOutput struct{ *pulumi.OutputState } func (DirectoryOutput) ElementType() reflect.Type { return reflect.TypeOf((**Directory)(nil)).Elem() } func (o DirectoryOutput) ToDirectoryOutput() DirectoryOutput { return o } func (o DirectoryOutput) ToDirectoryOutputWithContext(ctx context.Context) DirectoryOutput { return o } // The type of billing for the AAD B2C tenant. Possible values include: `MAU` or `Auths`. func (o DirectoryOutput) BillingType() pulumi.StringOutput { return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.BillingType }).(pulumi.StringOutput) } // Country code of the B2C tenant. The `countryCode` should be valid for the specified `dataResidencyLocation`. See [official docs](https://aka.ms/B2CDataResidency) for valid country codes. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created. func (o DirectoryOutput) CountryCode() pulumi.StringOutput { return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.CountryCode }).(pulumi.StringOutput) } // Location in which the B2C tenant is hosted and data resides. The `dataResidencyLocation` should be valid for the specified `countryCode`. See [official docs](https://aka.ms/B2CDataResidenc) for more information. Changing this forces a new AAD B2C Directory to be created. Possible values are `Asia Pacific`, `Australia`, `Europe`, `Global` and `United States`. func (o DirectoryOutput) DataResidencyLocation() pulumi.StringOutput { return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.DataResidencyLocation }).(pulumi.StringOutput) } // The initial display name of the B2C tenant. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created. func (o DirectoryOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // Domain name of the B2C tenant, including the `.onmicrosoft.com` suffix. Changing this forces a new AAD B2C Directory to be created. func (o DirectoryOutput) DomainName() pulumi.StringOutput { return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.DomainName }).(pulumi.StringOutput) } // The date from which the billing type took effect. May not be populated until after the first billing cycle. func (o DirectoryOutput) EffectiveStartDate() pulumi.StringOutput { return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.EffectiveStartDate }).(pulumi.StringOutput) } // The name of the Resource Group where the AAD B2C Directory should exist. Changing this forces a new AAD B2C Directory to be created. func (o DirectoryOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Billing SKU for the B2C tenant. Must be one of: `PremiumP1` or `PremiumP2` (`Standard` is not supported). See [official docs](https://aka.ms/b2cBilling) for more information. func (o DirectoryOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the AAD B2C Directory. func (o DirectoryOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Directory) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The Tenant ID for the AAD B2C tenant. func (o DirectoryOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type DirectoryArrayOutput struct{ *pulumi.OutputState } func (DirectoryArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Directory)(nil)).Elem() } func (o DirectoryArrayOutput) ToDirectoryArrayOutput() DirectoryArrayOutput { return o } func (o DirectoryArrayOutput) ToDirectoryArrayOutputWithContext(ctx context.Context) DirectoryArrayOutput { return o } func (o DirectoryArrayOutput) Index(i pulumi.IntInput) DirectoryOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Directory { return vs[0].([]*Directory)[vs[1].(int)] }).(DirectoryOutput) } type DirectoryMapOutput struct{ *pulumi.OutputState } func (DirectoryMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Directory)(nil)).Elem() } func (o DirectoryMapOutput) ToDirectoryMapOutput() DirectoryMapOutput { return o } func (o DirectoryMapOutput) ToDirectoryMapOutputWithContext(ctx context.Context) DirectoryMapOutput { return o } func (o DirectoryMapOutput) MapIndex(k pulumi.StringInput) DirectoryOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Directory { return vs[0].(map[string]*Directory)[vs[1].(string)] }).(DirectoryOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DirectoryInput)(nil)).Elem(), &Directory{}) pulumi.RegisterInputType(reflect.TypeOf((*DirectoryArrayInput)(nil)).Elem(), DirectoryArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DirectoryMapInput)(nil)).Elem(), DirectoryMap{}) pulumi.RegisterOutputType(DirectoryOutput{}) pulumi.RegisterOutputType(DirectoryArrayOutput{}) pulumi.RegisterOutputType(DirectoryMapOutput{}) }
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/aadb2c/getDirectory.go
sdk/go/azure/aadb2c/getDirectory.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 aadb2c 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 AAD B2C Directory. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/aadb2c" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := aadb2c.LookupDirectory(ctx, &aadb2c.LookupDirectoryArgs{ // ResourceGroupName: "example-rg", // DomainName: "exampleb2ctenant.onmicrosoft.com", // }, nil) // if err != nil { // return err // } // ctx.Export("tenantId", example.TenantId) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.AzureActiveDirectory` - 2021-04-01-preview func LookupDirectory(ctx *pulumi.Context, args *LookupDirectoryArgs, opts ...pulumi.InvokeOption) (*LookupDirectoryResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupDirectoryResult err := ctx.Invoke("azure:aadb2c/getDirectory:getDirectory", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getDirectory. type LookupDirectoryArgs struct { // Domain name of the B2C tenant, including the `.onmicrosoft.com` suffix. DomainName string `pulumi:"domainName"` // The name of the Resource Group where the AAD B2C Directory exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getDirectory. type LookupDirectoryResult struct { // The type of billing for the AAD B2C tenant. Possible values include: `MAU` or `Auths`. BillingType string `pulumi:"billingType"` // Location in which the B2C tenant is hosted and data resides. See [official docs](https://aka.ms/B2CDataResidenc) for more information. DataResidencyLocation string `pulumi:"dataResidencyLocation"` DomainName string `pulumi:"domainName"` // The date from which the billing type took effect. May not be populated until after the first billing cycle. EffectiveStartDate string `pulumi:"effectiveStartDate"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` ResourceGroupName string `pulumi:"resourceGroupName"` // Billing SKU for the B2C tenant. See [official docs](https://aka.ms/b2cBilling) for more information. SkuName string `pulumi:"skuName"` // A mapping of tags assigned to the AAD B2C Directory. Tags map[string]string `pulumi:"tags"` // The Tenant ID for the AAD B2C tenant. TenantId string `pulumi:"tenantId"` } func LookupDirectoryOutput(ctx *pulumi.Context, args LookupDirectoryOutputArgs, opts ...pulumi.InvokeOption) LookupDirectoryResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupDirectoryResultOutput, error) { args := v.(LookupDirectoryArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:aadb2c/getDirectory:getDirectory", args, LookupDirectoryResultOutput{}, options).(LookupDirectoryResultOutput), nil }).(LookupDirectoryResultOutput) } // A collection of arguments for invoking getDirectory. type LookupDirectoryOutputArgs struct { // Domain name of the B2C tenant, including the `.onmicrosoft.com` suffix. DomainName pulumi.StringInput `pulumi:"domainName"` // The name of the Resource Group where the AAD B2C Directory exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupDirectoryOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupDirectoryArgs)(nil)).Elem() } // A collection of values returned by getDirectory. type LookupDirectoryResultOutput struct{ *pulumi.OutputState } func (LookupDirectoryResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupDirectoryResult)(nil)).Elem() } func (o LookupDirectoryResultOutput) ToLookupDirectoryResultOutput() LookupDirectoryResultOutput { return o } func (o LookupDirectoryResultOutput) ToLookupDirectoryResultOutputWithContext(ctx context.Context) LookupDirectoryResultOutput { return o } // The type of billing for the AAD B2C tenant. Possible values include: `MAU` or `Auths`. func (o LookupDirectoryResultOutput) BillingType() pulumi.StringOutput { return o.ApplyT(func(v LookupDirectoryResult) string { return v.BillingType }).(pulumi.StringOutput) } // Location in which the B2C tenant is hosted and data resides. See [official docs](https://aka.ms/B2CDataResidenc) for more information. func (o LookupDirectoryResultOutput) DataResidencyLocation() pulumi.StringOutput { return o.ApplyT(func(v LookupDirectoryResult) string { return v.DataResidencyLocation }).(pulumi.StringOutput) } func (o LookupDirectoryResultOutput) DomainName() pulumi.StringOutput { return o.ApplyT(func(v LookupDirectoryResult) string { return v.DomainName }).(pulumi.StringOutput) } // The date from which the billing type took effect. May not be populated until after the first billing cycle. func (o LookupDirectoryResultOutput) EffectiveStartDate() pulumi.StringOutput { return o.ApplyT(func(v LookupDirectoryResult) string { return v.EffectiveStartDate }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupDirectoryResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupDirectoryResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupDirectoryResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupDirectoryResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // Billing SKU for the B2C tenant. See [official docs](https://aka.ms/b2cBilling) for more information. func (o LookupDirectoryResultOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v LookupDirectoryResult) string { return v.SkuName }).(pulumi.StringOutput) } // A mapping of tags assigned to the AAD B2C Directory. func (o LookupDirectoryResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupDirectoryResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The Tenant ID for the AAD B2C tenant. func (o LookupDirectoryResultOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v LookupDirectoryResult) string { return v.TenantId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupDirectoryResultOutput{}) }
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/webpubsub/init.go
sdk/go/azure/webpubsub/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 webpubsub 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:webpubsub/customCertificate:CustomCertificate": r = &CustomCertificate{} case "azure:webpubsub/customDomain:CustomDomain": r = &CustomDomain{} case "azure:webpubsub/hub:Hub": r = &Hub{} case "azure:webpubsub/networkAcl:NetworkAcl": r = &NetworkAcl{} case "azure:webpubsub/service:Service": r = &Service{} case "azure:webpubsub/sharedPrivateLinkResource:SharedPrivateLinkResource": r = &SharedPrivateLinkResource{} case "azure:webpubsub/socketio:Socketio": r = &Socketio{} 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", "webpubsub/customCertificate", &module{version}, ) pulumi.RegisterResourceModule( "azure", "webpubsub/customDomain", &module{version}, ) pulumi.RegisterResourceModule( "azure", "webpubsub/hub", &module{version}, ) pulumi.RegisterResourceModule( "azure", "webpubsub/networkAcl", &module{version}, ) pulumi.RegisterResourceModule( "azure", "webpubsub/service", &module{version}, ) pulumi.RegisterResourceModule( "azure", "webpubsub/sharedPrivateLinkResource", &module{version}, ) pulumi.RegisterResourceModule( "azure", "webpubsub/socketio", &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/webpubsub/pulumiTypes.go
sdk/go/azure/webpubsub/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 webpubsub 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 HubEventHandler struct { // An `auth` block as defined below. Auth *HubEventHandlerAuth `pulumi:"auth"` // Specifies the list of system events. Supported values are `connect`, `connected` and `disconnected`. SystemEvents []string `pulumi:"systemEvents"` // The Event Handler URL Template. Two predefined parameters `{hub}` and `{event}` are available to use in the template. The value of the EventHandler URL is dynamically calculated when the client request comes in. Example: `http://example.com/api/{hub}/{event}`. UrlTemplate string `pulumi:"urlTemplate"` // Specifies the matching event names. There are 3 kind of patterns supported: * `*` matches any event name * `,` Combine multiple events with `,` for example `event1,event2`, it matches event `event1` and `event2` * The single event name, for example `event1`, it matches `event1`. UserEventPattern *string `pulumi:"userEventPattern"` } // HubEventHandlerInput is an input type that accepts HubEventHandlerArgs and HubEventHandlerOutput values. // You can construct a concrete instance of `HubEventHandlerInput` via: // // HubEventHandlerArgs{...} type HubEventHandlerInput interface { pulumi.Input ToHubEventHandlerOutput() HubEventHandlerOutput ToHubEventHandlerOutputWithContext(context.Context) HubEventHandlerOutput } type HubEventHandlerArgs struct { // An `auth` block as defined below. Auth HubEventHandlerAuthPtrInput `pulumi:"auth"` // Specifies the list of system events. Supported values are `connect`, `connected` and `disconnected`. SystemEvents pulumi.StringArrayInput `pulumi:"systemEvents"` // The Event Handler URL Template. Two predefined parameters `{hub}` and `{event}` are available to use in the template. The value of the EventHandler URL is dynamically calculated when the client request comes in. Example: `http://example.com/api/{hub}/{event}`. UrlTemplate pulumi.StringInput `pulumi:"urlTemplate"` // Specifies the matching event names. There are 3 kind of patterns supported: * `*` matches any event name * `,` Combine multiple events with `,` for example `event1,event2`, it matches event `event1` and `event2` * The single event name, for example `event1`, it matches `event1`. UserEventPattern pulumi.StringPtrInput `pulumi:"userEventPattern"` } func (HubEventHandlerArgs) ElementType() reflect.Type { return reflect.TypeOf((*HubEventHandler)(nil)).Elem() } func (i HubEventHandlerArgs) ToHubEventHandlerOutput() HubEventHandlerOutput { return i.ToHubEventHandlerOutputWithContext(context.Background()) } func (i HubEventHandlerArgs) ToHubEventHandlerOutputWithContext(ctx context.Context) HubEventHandlerOutput { return pulumi.ToOutputWithContext(ctx, i).(HubEventHandlerOutput) } // HubEventHandlerArrayInput is an input type that accepts HubEventHandlerArray and HubEventHandlerArrayOutput values. // You can construct a concrete instance of `HubEventHandlerArrayInput` via: // // HubEventHandlerArray{ HubEventHandlerArgs{...} } type HubEventHandlerArrayInput interface { pulumi.Input ToHubEventHandlerArrayOutput() HubEventHandlerArrayOutput ToHubEventHandlerArrayOutputWithContext(context.Context) HubEventHandlerArrayOutput } type HubEventHandlerArray []HubEventHandlerInput func (HubEventHandlerArray) ElementType() reflect.Type { return reflect.TypeOf((*[]HubEventHandler)(nil)).Elem() } func (i HubEventHandlerArray) ToHubEventHandlerArrayOutput() HubEventHandlerArrayOutput { return i.ToHubEventHandlerArrayOutputWithContext(context.Background()) } func (i HubEventHandlerArray) ToHubEventHandlerArrayOutputWithContext(ctx context.Context) HubEventHandlerArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(HubEventHandlerArrayOutput) } type HubEventHandlerOutput struct{ *pulumi.OutputState } func (HubEventHandlerOutput) ElementType() reflect.Type { return reflect.TypeOf((*HubEventHandler)(nil)).Elem() } func (o HubEventHandlerOutput) ToHubEventHandlerOutput() HubEventHandlerOutput { return o } func (o HubEventHandlerOutput) ToHubEventHandlerOutputWithContext(ctx context.Context) HubEventHandlerOutput { return o } // An `auth` block as defined below. func (o HubEventHandlerOutput) Auth() HubEventHandlerAuthPtrOutput { return o.ApplyT(func(v HubEventHandler) *HubEventHandlerAuth { return v.Auth }).(HubEventHandlerAuthPtrOutput) } // Specifies the list of system events. Supported values are `connect`, `connected` and `disconnected`. func (o HubEventHandlerOutput) SystemEvents() pulumi.StringArrayOutput { return o.ApplyT(func(v HubEventHandler) []string { return v.SystemEvents }).(pulumi.StringArrayOutput) } // The Event Handler URL Template. Two predefined parameters `{hub}` and `{event}` are available to use in the template. The value of the EventHandler URL is dynamically calculated when the client request comes in. Example: `http://example.com/api/{hub}/{event}`. func (o HubEventHandlerOutput) UrlTemplate() pulumi.StringOutput { return o.ApplyT(func(v HubEventHandler) string { return v.UrlTemplate }).(pulumi.StringOutput) } // Specifies the matching event names. There are 3 kind of patterns supported: * `*` matches any event name * `,` Combine multiple events with `,` for example `event1,event2`, it matches event `event1` and `event2` * The single event name, for example `event1`, it matches `event1`. func (o HubEventHandlerOutput) UserEventPattern() pulumi.StringPtrOutput { return o.ApplyT(func(v HubEventHandler) *string { return v.UserEventPattern }).(pulumi.StringPtrOutput) } type HubEventHandlerArrayOutput struct{ *pulumi.OutputState } func (HubEventHandlerArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]HubEventHandler)(nil)).Elem() } func (o HubEventHandlerArrayOutput) ToHubEventHandlerArrayOutput() HubEventHandlerArrayOutput { return o } func (o HubEventHandlerArrayOutput) ToHubEventHandlerArrayOutputWithContext(ctx context.Context) HubEventHandlerArrayOutput { return o } func (o HubEventHandlerArrayOutput) Index(i pulumi.IntInput) HubEventHandlerOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) HubEventHandler { return vs[0].([]HubEventHandler)[vs[1].(int)] }).(HubEventHandlerOutput) } type HubEventHandlerAuth struct { // Specify the identity ID of the target resource. // // > **Note:** `managedIdentityId` is required if the auth block is defined ManagedIdentityId string `pulumi:"managedIdentityId"` } // HubEventHandlerAuthInput is an input type that accepts HubEventHandlerAuthArgs and HubEventHandlerAuthOutput values. // You can construct a concrete instance of `HubEventHandlerAuthInput` via: // // HubEventHandlerAuthArgs{...} type HubEventHandlerAuthInput interface { pulumi.Input ToHubEventHandlerAuthOutput() HubEventHandlerAuthOutput ToHubEventHandlerAuthOutputWithContext(context.Context) HubEventHandlerAuthOutput } type HubEventHandlerAuthArgs struct { // Specify the identity ID of the target resource. // // > **Note:** `managedIdentityId` is required if the auth block is defined ManagedIdentityId pulumi.StringInput `pulumi:"managedIdentityId"` } func (HubEventHandlerAuthArgs) ElementType() reflect.Type { return reflect.TypeOf((*HubEventHandlerAuth)(nil)).Elem() } func (i HubEventHandlerAuthArgs) ToHubEventHandlerAuthOutput() HubEventHandlerAuthOutput { return i.ToHubEventHandlerAuthOutputWithContext(context.Background()) } func (i HubEventHandlerAuthArgs) ToHubEventHandlerAuthOutputWithContext(ctx context.Context) HubEventHandlerAuthOutput { return pulumi.ToOutputWithContext(ctx, i).(HubEventHandlerAuthOutput) } func (i HubEventHandlerAuthArgs) ToHubEventHandlerAuthPtrOutput() HubEventHandlerAuthPtrOutput { return i.ToHubEventHandlerAuthPtrOutputWithContext(context.Background()) } func (i HubEventHandlerAuthArgs) ToHubEventHandlerAuthPtrOutputWithContext(ctx context.Context) HubEventHandlerAuthPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(HubEventHandlerAuthOutput).ToHubEventHandlerAuthPtrOutputWithContext(ctx) } // HubEventHandlerAuthPtrInput is an input type that accepts HubEventHandlerAuthArgs, HubEventHandlerAuthPtr and HubEventHandlerAuthPtrOutput values. // You can construct a concrete instance of `HubEventHandlerAuthPtrInput` via: // // HubEventHandlerAuthArgs{...} // // or: // // nil type HubEventHandlerAuthPtrInput interface { pulumi.Input ToHubEventHandlerAuthPtrOutput() HubEventHandlerAuthPtrOutput ToHubEventHandlerAuthPtrOutputWithContext(context.Context) HubEventHandlerAuthPtrOutput } type hubEventHandlerAuthPtrType HubEventHandlerAuthArgs func HubEventHandlerAuthPtr(v *HubEventHandlerAuthArgs) HubEventHandlerAuthPtrInput { return (*hubEventHandlerAuthPtrType)(v) } func (*hubEventHandlerAuthPtrType) ElementType() reflect.Type { return reflect.TypeOf((**HubEventHandlerAuth)(nil)).Elem() } func (i *hubEventHandlerAuthPtrType) ToHubEventHandlerAuthPtrOutput() HubEventHandlerAuthPtrOutput { return i.ToHubEventHandlerAuthPtrOutputWithContext(context.Background()) } func (i *hubEventHandlerAuthPtrType) ToHubEventHandlerAuthPtrOutputWithContext(ctx context.Context) HubEventHandlerAuthPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(HubEventHandlerAuthPtrOutput) } type HubEventHandlerAuthOutput struct{ *pulumi.OutputState } func (HubEventHandlerAuthOutput) ElementType() reflect.Type { return reflect.TypeOf((*HubEventHandlerAuth)(nil)).Elem() } func (o HubEventHandlerAuthOutput) ToHubEventHandlerAuthOutput() HubEventHandlerAuthOutput { return o } func (o HubEventHandlerAuthOutput) ToHubEventHandlerAuthOutputWithContext(ctx context.Context) HubEventHandlerAuthOutput { return o } func (o HubEventHandlerAuthOutput) ToHubEventHandlerAuthPtrOutput() HubEventHandlerAuthPtrOutput { return o.ToHubEventHandlerAuthPtrOutputWithContext(context.Background()) } func (o HubEventHandlerAuthOutput) ToHubEventHandlerAuthPtrOutputWithContext(ctx context.Context) HubEventHandlerAuthPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v HubEventHandlerAuth) *HubEventHandlerAuth { return &v }).(HubEventHandlerAuthPtrOutput) } // Specify the identity ID of the target resource. // // > **Note:** `managedIdentityId` is required if the auth block is defined func (o HubEventHandlerAuthOutput) ManagedIdentityId() pulumi.StringOutput { return o.ApplyT(func(v HubEventHandlerAuth) string { return v.ManagedIdentityId }).(pulumi.StringOutput) } type HubEventHandlerAuthPtrOutput struct{ *pulumi.OutputState } func (HubEventHandlerAuthPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**HubEventHandlerAuth)(nil)).Elem() } func (o HubEventHandlerAuthPtrOutput) ToHubEventHandlerAuthPtrOutput() HubEventHandlerAuthPtrOutput { return o } func (o HubEventHandlerAuthPtrOutput) ToHubEventHandlerAuthPtrOutputWithContext(ctx context.Context) HubEventHandlerAuthPtrOutput { return o } func (o HubEventHandlerAuthPtrOutput) Elem() HubEventHandlerAuthOutput { return o.ApplyT(func(v *HubEventHandlerAuth) HubEventHandlerAuth { if v != nil { return *v } var ret HubEventHandlerAuth return ret }).(HubEventHandlerAuthOutput) } // Specify the identity ID of the target resource. // // > **Note:** `managedIdentityId` is required if the auth block is defined func (o HubEventHandlerAuthPtrOutput) ManagedIdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v *HubEventHandlerAuth) *string { if v == nil { return nil } return &v.ManagedIdentityId }).(pulumi.StringPtrOutput) } type HubEventListener struct { // Specifies the event hub name to receive the events. EventhubName string `pulumi:"eventhubName"` // Specifies the event hub namespace name to receive the events. EventhubNamespaceName string `pulumi:"eventhubNamespaceName"` // Specifies the list of system events. Supported values are `connected` and `disconnected`. SystemEventNameFilters []string `pulumi:"systemEventNameFilters"` // Specifies the list of matching user event names. `["*"]` can be used to match all events. UserEventNameFilters []string `pulumi:"userEventNameFilters"` } // HubEventListenerInput is an input type that accepts HubEventListenerArgs and HubEventListenerOutput values. // You can construct a concrete instance of `HubEventListenerInput` via: // // HubEventListenerArgs{...} type HubEventListenerInput interface { pulumi.Input ToHubEventListenerOutput() HubEventListenerOutput ToHubEventListenerOutputWithContext(context.Context) HubEventListenerOutput } type HubEventListenerArgs struct { // Specifies the event hub name to receive the events. EventhubName pulumi.StringInput `pulumi:"eventhubName"` // Specifies the event hub namespace name to receive the events. EventhubNamespaceName pulumi.StringInput `pulumi:"eventhubNamespaceName"` // Specifies the list of system events. Supported values are `connected` and `disconnected`. SystemEventNameFilters pulumi.StringArrayInput `pulumi:"systemEventNameFilters"` // Specifies the list of matching user event names. `["*"]` can be used to match all events. UserEventNameFilters pulumi.StringArrayInput `pulumi:"userEventNameFilters"` } func (HubEventListenerArgs) ElementType() reflect.Type { return reflect.TypeOf((*HubEventListener)(nil)).Elem() } func (i HubEventListenerArgs) ToHubEventListenerOutput() HubEventListenerOutput { return i.ToHubEventListenerOutputWithContext(context.Background()) } func (i HubEventListenerArgs) ToHubEventListenerOutputWithContext(ctx context.Context) HubEventListenerOutput { return pulumi.ToOutputWithContext(ctx, i).(HubEventListenerOutput) } // HubEventListenerArrayInput is an input type that accepts HubEventListenerArray and HubEventListenerArrayOutput values. // You can construct a concrete instance of `HubEventListenerArrayInput` via: // // HubEventListenerArray{ HubEventListenerArgs{...} } type HubEventListenerArrayInput interface { pulumi.Input ToHubEventListenerArrayOutput() HubEventListenerArrayOutput ToHubEventListenerArrayOutputWithContext(context.Context) HubEventListenerArrayOutput } type HubEventListenerArray []HubEventListenerInput func (HubEventListenerArray) ElementType() reflect.Type { return reflect.TypeOf((*[]HubEventListener)(nil)).Elem() } func (i HubEventListenerArray) ToHubEventListenerArrayOutput() HubEventListenerArrayOutput { return i.ToHubEventListenerArrayOutputWithContext(context.Background()) } func (i HubEventListenerArray) ToHubEventListenerArrayOutputWithContext(ctx context.Context) HubEventListenerArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(HubEventListenerArrayOutput) } type HubEventListenerOutput struct{ *pulumi.OutputState } func (HubEventListenerOutput) ElementType() reflect.Type { return reflect.TypeOf((*HubEventListener)(nil)).Elem() } func (o HubEventListenerOutput) ToHubEventListenerOutput() HubEventListenerOutput { return o } func (o HubEventListenerOutput) ToHubEventListenerOutputWithContext(ctx context.Context) HubEventListenerOutput { return o } // Specifies the event hub name to receive the events. func (o HubEventListenerOutput) EventhubName() pulumi.StringOutput { return o.ApplyT(func(v HubEventListener) string { return v.EventhubName }).(pulumi.StringOutput) } // Specifies the event hub namespace name to receive the events. func (o HubEventListenerOutput) EventhubNamespaceName() pulumi.StringOutput { return o.ApplyT(func(v HubEventListener) string { return v.EventhubNamespaceName }).(pulumi.StringOutput) } // Specifies the list of system events. Supported values are `connected` and `disconnected`. func (o HubEventListenerOutput) SystemEventNameFilters() pulumi.StringArrayOutput { return o.ApplyT(func(v HubEventListener) []string { return v.SystemEventNameFilters }).(pulumi.StringArrayOutput) } // Specifies the list of matching user event names. `["*"]` can be used to match all events. func (o HubEventListenerOutput) UserEventNameFilters() pulumi.StringArrayOutput { return o.ApplyT(func(v HubEventListener) []string { return v.UserEventNameFilters }).(pulumi.StringArrayOutput) } type HubEventListenerArrayOutput struct{ *pulumi.OutputState } func (HubEventListenerArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]HubEventListener)(nil)).Elem() } func (o HubEventListenerArrayOutput) ToHubEventListenerArrayOutput() HubEventListenerArrayOutput { return o } func (o HubEventListenerArrayOutput) ToHubEventListenerArrayOutputWithContext(ctx context.Context) HubEventListenerArrayOutput { return o } func (o HubEventListenerArrayOutput) Index(i pulumi.IntInput) HubEventListenerOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) HubEventListener { return vs[0].([]HubEventListener)[vs[1].(int)] }).(HubEventListenerOutput) } type NetworkAclPrivateEndpoint struct { // The allowed request types for the Private Endpoint Connection. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`. AllowedRequestTypes []string `pulumi:"allowedRequestTypes"` // The denied request types for the Private Endpoint Connection. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`. // // > **Note:** When `defaultAction` is `Allow`, `allowedRequestTypes`cannot be set. When `defaultAction` is `Deny`, `deniedRequestTypes`cannot be set. DeniedRequestTypes []string `pulumi:"deniedRequestTypes"` // The ID of the Private Endpoint which is based on the Web Pubsub service. Id string `pulumi:"id"` } // NetworkAclPrivateEndpointInput is an input type that accepts NetworkAclPrivateEndpointArgs and NetworkAclPrivateEndpointOutput values. // You can construct a concrete instance of `NetworkAclPrivateEndpointInput` via: // // NetworkAclPrivateEndpointArgs{...} type NetworkAclPrivateEndpointInput interface { pulumi.Input ToNetworkAclPrivateEndpointOutput() NetworkAclPrivateEndpointOutput ToNetworkAclPrivateEndpointOutputWithContext(context.Context) NetworkAclPrivateEndpointOutput } type NetworkAclPrivateEndpointArgs struct { // The allowed request types for the Private Endpoint Connection. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`. AllowedRequestTypes pulumi.StringArrayInput `pulumi:"allowedRequestTypes"` // The denied request types for the Private Endpoint Connection. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`. // // > **Note:** When `defaultAction` is `Allow`, `allowedRequestTypes`cannot be set. When `defaultAction` is `Deny`, `deniedRequestTypes`cannot be set. DeniedRequestTypes pulumi.StringArrayInput `pulumi:"deniedRequestTypes"` // The ID of the Private Endpoint which is based on the Web Pubsub service. Id pulumi.StringInput `pulumi:"id"` } func (NetworkAclPrivateEndpointArgs) ElementType() reflect.Type { return reflect.TypeOf((*NetworkAclPrivateEndpoint)(nil)).Elem() } func (i NetworkAclPrivateEndpointArgs) ToNetworkAclPrivateEndpointOutput() NetworkAclPrivateEndpointOutput { return i.ToNetworkAclPrivateEndpointOutputWithContext(context.Background()) } func (i NetworkAclPrivateEndpointArgs) ToNetworkAclPrivateEndpointOutputWithContext(ctx context.Context) NetworkAclPrivateEndpointOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkAclPrivateEndpointOutput) } // NetworkAclPrivateEndpointArrayInput is an input type that accepts NetworkAclPrivateEndpointArray and NetworkAclPrivateEndpointArrayOutput values. // You can construct a concrete instance of `NetworkAclPrivateEndpointArrayInput` via: // // NetworkAclPrivateEndpointArray{ NetworkAclPrivateEndpointArgs{...} } type NetworkAclPrivateEndpointArrayInput interface { pulumi.Input ToNetworkAclPrivateEndpointArrayOutput() NetworkAclPrivateEndpointArrayOutput ToNetworkAclPrivateEndpointArrayOutputWithContext(context.Context) NetworkAclPrivateEndpointArrayOutput } type NetworkAclPrivateEndpointArray []NetworkAclPrivateEndpointInput func (NetworkAclPrivateEndpointArray) ElementType() reflect.Type { return reflect.TypeOf((*[]NetworkAclPrivateEndpoint)(nil)).Elem() } func (i NetworkAclPrivateEndpointArray) ToNetworkAclPrivateEndpointArrayOutput() NetworkAclPrivateEndpointArrayOutput { return i.ToNetworkAclPrivateEndpointArrayOutputWithContext(context.Background()) } func (i NetworkAclPrivateEndpointArray) ToNetworkAclPrivateEndpointArrayOutputWithContext(ctx context.Context) NetworkAclPrivateEndpointArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkAclPrivateEndpointArrayOutput) } type NetworkAclPrivateEndpointOutput struct{ *pulumi.OutputState } func (NetworkAclPrivateEndpointOutput) ElementType() reflect.Type { return reflect.TypeOf((*NetworkAclPrivateEndpoint)(nil)).Elem() } func (o NetworkAclPrivateEndpointOutput) ToNetworkAclPrivateEndpointOutput() NetworkAclPrivateEndpointOutput { return o } func (o NetworkAclPrivateEndpointOutput) ToNetworkAclPrivateEndpointOutputWithContext(ctx context.Context) NetworkAclPrivateEndpointOutput { return o } // The allowed request types for the Private Endpoint Connection. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`. func (o NetworkAclPrivateEndpointOutput) AllowedRequestTypes() pulumi.StringArrayOutput { return o.ApplyT(func(v NetworkAclPrivateEndpoint) []string { return v.AllowedRequestTypes }).(pulumi.StringArrayOutput) } // The denied request types for the Private Endpoint Connection. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`. // // > **Note:** When `defaultAction` is `Allow`, `allowedRequestTypes`cannot be set. When `defaultAction` is `Deny`, `deniedRequestTypes`cannot be set. func (o NetworkAclPrivateEndpointOutput) DeniedRequestTypes() pulumi.StringArrayOutput { return o.ApplyT(func(v NetworkAclPrivateEndpoint) []string { return v.DeniedRequestTypes }).(pulumi.StringArrayOutput) } // The ID of the Private Endpoint which is based on the Web Pubsub service. func (o NetworkAclPrivateEndpointOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v NetworkAclPrivateEndpoint) string { return v.Id }).(pulumi.StringOutput) } type NetworkAclPrivateEndpointArrayOutput struct{ *pulumi.OutputState } func (NetworkAclPrivateEndpointArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]NetworkAclPrivateEndpoint)(nil)).Elem() } func (o NetworkAclPrivateEndpointArrayOutput) ToNetworkAclPrivateEndpointArrayOutput() NetworkAclPrivateEndpointArrayOutput { return o } func (o NetworkAclPrivateEndpointArrayOutput) ToNetworkAclPrivateEndpointArrayOutputWithContext(ctx context.Context) NetworkAclPrivateEndpointArrayOutput { return o } func (o NetworkAclPrivateEndpointArrayOutput) Index(i pulumi.IntInput) NetworkAclPrivateEndpointOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) NetworkAclPrivateEndpoint { return vs[0].([]NetworkAclPrivateEndpoint)[vs[1].(int)] }).(NetworkAclPrivateEndpointOutput) } type NetworkAclPublicNetwork struct { // The allowed request types for the public network. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`. AllowedRequestTypes []string `pulumi:"allowedRequestTypes"` // The denied request types for the public network. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`. // // > **Note:** When `defaultAction` is `Allow`, `allowedRequestTypes`cannot be set. When `defaultAction` is `Deny`, `deniedRequestTypes`cannot be set. DeniedRequestTypes []string `pulumi:"deniedRequestTypes"` } // NetworkAclPublicNetworkInput is an input type that accepts NetworkAclPublicNetworkArgs and NetworkAclPublicNetworkOutput values. // You can construct a concrete instance of `NetworkAclPublicNetworkInput` via: // // NetworkAclPublicNetworkArgs{...} type NetworkAclPublicNetworkInput interface { pulumi.Input ToNetworkAclPublicNetworkOutput() NetworkAclPublicNetworkOutput ToNetworkAclPublicNetworkOutputWithContext(context.Context) NetworkAclPublicNetworkOutput } type NetworkAclPublicNetworkArgs struct { // The allowed request types for the public network. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`. AllowedRequestTypes pulumi.StringArrayInput `pulumi:"allowedRequestTypes"` // The denied request types for the public network. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`. // // > **Note:** When `defaultAction` is `Allow`, `allowedRequestTypes`cannot be set. When `defaultAction` is `Deny`, `deniedRequestTypes`cannot be set. DeniedRequestTypes pulumi.StringArrayInput `pulumi:"deniedRequestTypes"` } func (NetworkAclPublicNetworkArgs) ElementType() reflect.Type { return reflect.TypeOf((*NetworkAclPublicNetwork)(nil)).Elem() } func (i NetworkAclPublicNetworkArgs) ToNetworkAclPublicNetworkOutput() NetworkAclPublicNetworkOutput { return i.ToNetworkAclPublicNetworkOutputWithContext(context.Background()) } func (i NetworkAclPublicNetworkArgs) ToNetworkAclPublicNetworkOutputWithContext(ctx context.Context) NetworkAclPublicNetworkOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkAclPublicNetworkOutput) } func (i NetworkAclPublicNetworkArgs) ToNetworkAclPublicNetworkPtrOutput() NetworkAclPublicNetworkPtrOutput { return i.ToNetworkAclPublicNetworkPtrOutputWithContext(context.Background()) } func (i NetworkAclPublicNetworkArgs) ToNetworkAclPublicNetworkPtrOutputWithContext(ctx context.Context) NetworkAclPublicNetworkPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkAclPublicNetworkOutput).ToNetworkAclPublicNetworkPtrOutputWithContext(ctx) } // NetworkAclPublicNetworkPtrInput is an input type that accepts NetworkAclPublicNetworkArgs, NetworkAclPublicNetworkPtr and NetworkAclPublicNetworkPtrOutput values. // You can construct a concrete instance of `NetworkAclPublicNetworkPtrInput` via: // // NetworkAclPublicNetworkArgs{...} // // or: // // nil type NetworkAclPublicNetworkPtrInput interface { pulumi.Input ToNetworkAclPublicNetworkPtrOutput() NetworkAclPublicNetworkPtrOutput ToNetworkAclPublicNetworkPtrOutputWithContext(context.Context) NetworkAclPublicNetworkPtrOutput } type networkAclPublicNetworkPtrType NetworkAclPublicNetworkArgs func NetworkAclPublicNetworkPtr(v *NetworkAclPublicNetworkArgs) NetworkAclPublicNetworkPtrInput { return (*networkAclPublicNetworkPtrType)(v) } func (*networkAclPublicNetworkPtrType) ElementType() reflect.Type { return reflect.TypeOf((**NetworkAclPublicNetwork)(nil)).Elem() } func (i *networkAclPublicNetworkPtrType) ToNetworkAclPublicNetworkPtrOutput() NetworkAclPublicNetworkPtrOutput { return i.ToNetworkAclPublicNetworkPtrOutputWithContext(context.Background()) } func (i *networkAclPublicNetworkPtrType) ToNetworkAclPublicNetworkPtrOutputWithContext(ctx context.Context) NetworkAclPublicNetworkPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkAclPublicNetworkPtrOutput) } type NetworkAclPublicNetworkOutput struct{ *pulumi.OutputState } func (NetworkAclPublicNetworkOutput) ElementType() reflect.Type { return reflect.TypeOf((*NetworkAclPublicNetwork)(nil)).Elem() } func (o NetworkAclPublicNetworkOutput) ToNetworkAclPublicNetworkOutput() NetworkAclPublicNetworkOutput { return o } func (o NetworkAclPublicNetworkOutput) ToNetworkAclPublicNetworkOutputWithContext(ctx context.Context) NetworkAclPublicNetworkOutput { return o } func (o NetworkAclPublicNetworkOutput) ToNetworkAclPublicNetworkPtrOutput() NetworkAclPublicNetworkPtrOutput { return o.ToNetworkAclPublicNetworkPtrOutputWithContext(context.Background()) } func (o NetworkAclPublicNetworkOutput) ToNetworkAclPublicNetworkPtrOutputWithContext(ctx context.Context) NetworkAclPublicNetworkPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v NetworkAclPublicNetwork) *NetworkAclPublicNetwork { return &v }).(NetworkAclPublicNetworkPtrOutput) } // The allowed request types for the public network. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`. func (o NetworkAclPublicNetworkOutput) AllowedRequestTypes() pulumi.StringArrayOutput { return o.ApplyT(func(v NetworkAclPublicNetwork) []string { return v.AllowedRequestTypes }).(pulumi.StringArrayOutput) } // The denied request types for the public network. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`. // // > **Note:** When `defaultAction` is `Allow`, `allowedRequestTypes`cannot be set. When `defaultAction` is `Deny`, `deniedRequestTypes`cannot be set. func (o NetworkAclPublicNetworkOutput) DeniedRequestTypes() pulumi.StringArrayOutput { return o.ApplyT(func(v NetworkAclPublicNetwork) []string { return v.DeniedRequestTypes }).(pulumi.StringArrayOutput) } type NetworkAclPublicNetworkPtrOutput struct{ *pulumi.OutputState } func (NetworkAclPublicNetworkPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkAclPublicNetwork)(nil)).Elem() } func (o NetworkAclPublicNetworkPtrOutput) ToNetworkAclPublicNetworkPtrOutput() NetworkAclPublicNetworkPtrOutput { return o } func (o NetworkAclPublicNetworkPtrOutput) ToNetworkAclPublicNetworkPtrOutputWithContext(ctx context.Context) NetworkAclPublicNetworkPtrOutput { return o } func (o NetworkAclPublicNetworkPtrOutput) Elem() NetworkAclPublicNetworkOutput { return o.ApplyT(func(v *NetworkAclPublicNetwork) NetworkAclPublicNetwork { if v != nil { return *v } var ret NetworkAclPublicNetwork return ret }).(NetworkAclPublicNetworkOutput) } // The allowed request types for the public network. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`. func (o NetworkAclPublicNetworkPtrOutput) AllowedRequestTypes() pulumi.StringArrayOutput { return o.ApplyT(func(v *NetworkAclPublicNetwork) []string { if v == nil { return nil } return v.AllowedRequestTypes }).(pulumi.StringArrayOutput) } // The denied request types for the public network. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`. // // > **Note:** When `defaultAction` is `Allow`, `allowedRequestTypes`cannot be set. When `defaultAction` is `Deny`, `deniedRequestTypes`cannot be set. func (o NetworkAclPublicNetworkPtrOutput) DeniedRequestTypes() pulumi.StringArrayOutput { return o.ApplyT(func(v *NetworkAclPublicNetwork) []string { if v == nil { return nil } return v.DeniedRequestTypes }).(pulumi.StringArrayOutput) } type ServiceIdentity struct { // Specifies a list of User Assigned Managed Identity IDs to be assigned to this Web PubSub. // // > **Note:** This is required when `type` is set to `UserAssigned` IdentityIds []string `pulumi:"identityIds"` // The Principal ID associated with this Managed Service Identity. PrincipalId *string `pulumi:"principalId"` // The Tenant ID associated with this Managed Service Identity. TenantId *string `pulumi:"tenantId"` // Specifies the type of Managed Service Identity that should be configured on this Web PubSub. Possible values are `SystemAssigned`, `UserAssigned`. Type string `pulumi:"type"` } // ServiceIdentityInput is an input type that accepts ServiceIdentityArgs and ServiceIdentityOutput values. // You can construct a concrete instance of `ServiceIdentityInput` via: // // ServiceIdentityArgs{...} type ServiceIdentityInput interface { pulumi.Input ToServiceIdentityOutput() ServiceIdentityOutput ToServiceIdentityOutputWithContext(context.Context) ServiceIdentityOutput } type ServiceIdentityArgs struct { // Specifies a list of User Assigned Managed Identity IDs to be assigned to this Web PubSub. // // > **Note:** This is required when `type` is set to `UserAssigned` IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"` // The Principal ID associated with this Managed Service Identity. PrincipalId pulumi.StringPtrInput `pulumi:"principalId"` // The Tenant ID associated with this Managed Service Identity. TenantId pulumi.StringPtrInput `pulumi:"tenantId"` // Specifies the type of Managed Service Identity that should be configured on this Web PubSub. Possible values are `SystemAssigned`, `UserAssigned`. Type pulumi.StringInput `pulumi:"type"` } func (ServiceIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*ServiceIdentity)(nil)).Elem() } func (i ServiceIdentityArgs) ToServiceIdentityOutput() ServiceIdentityOutput { return i.ToServiceIdentityOutputWithContext(context.Background()) } func (i ServiceIdentityArgs) ToServiceIdentityOutputWithContext(ctx context.Context) ServiceIdentityOutput {
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/webpubsub/hub.go
sdk/go/azure/webpubsub/hub.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 webpubsub import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages the hub settings for a Web Pubsub. // // ## 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/webpubsub" // "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("terraform-webpubsub"), // Location: pulumi.String("east us"), // }) // if err != nil { // return err // } // exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{ // Name: pulumi.String("tfex-uai"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // exampleService, err := webpubsub.NewService(ctx, "example", &webpubsub.ServiceArgs{ // Name: pulumi.String("tfex-webpubsub"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("Standard_S1"), // Capacity: pulumi.Int(1), // }) // if err != nil { // return err // } // _, err = webpubsub.NewHub(ctx, "example", &webpubsub.HubArgs{ // Name: pulumi.String("tfex_wpsh"), // WebPubsubId: exampleService.ID(), // EventHandlers: webpubsub.HubEventHandlerArray{ // &webpubsub.HubEventHandlerArgs{ // UrlTemplate: pulumi.String("https://test.com/api/{hub}/{event}"), // UserEventPattern: pulumi.String("*"), // SystemEvents: pulumi.StringArray{ // pulumi.String("connect"), // pulumi.String("connected"), // }, // }, // &webpubsub.HubEventHandlerArgs{ // UrlTemplate: pulumi.String("https://test.com/api/{hub}/{event}"), // UserEventPattern: pulumi.String("event1, event2"), // SystemEvents: pulumi.StringArray{ // pulumi.String("connected"), // }, // Auth: &webpubsub.HubEventHandlerAuthArgs{ // ManagedIdentityId: exampleUserAssignedIdentity.ID(), // }, // }, // }, // EventListeners: webpubsub.HubEventListenerArray{ // &webpubsub.HubEventListenerArgs{ // SystemEventNameFilters: pulumi.StringArray{ // pulumi.String("connected"), // }, // UserEventNameFilters: pulumi.StringArray{ // pulumi.String("event1"), // pulumi.String("event2"), // }, // EventhubNamespaceName: pulumi.Any(test.Name), // EventhubName: pulumi.Any(test1.Name), // }, // &webpubsub.HubEventListenerArgs{ // SystemEventNameFilters: pulumi.StringArray{ // pulumi.String("connected"), // }, // UserEventNameFilters: pulumi.StringArray{ // pulumi.String("*"), // }, // EventhubNamespaceName: pulumi.Any(test.Name), // EventhubName: pulumi.Any(test1.Name), // }, // &webpubsub.HubEventListenerArgs{ // SystemEventNameFilters: pulumi.StringArray{ // pulumi.String("connected"), // }, // UserEventNameFilters: pulumi.StringArray{ // pulumi.String("event1"), // }, // EventhubNamespaceName: pulumi.Any(test.Name), // EventhubName: pulumi.Any(test1.Name), // }, // }, // AnonymousConnectionsEnabled: pulumi.Bool(true), // }, pulumi.DependsOn([]pulumi.Resource{ // exampleService, // })) // 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.SignalRService` - 2024-03-01 // // ## Import // // Web Pubsub Hub can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:webpubsub/hub:Hub example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SignalRService/webPubSub/webPubSub1/hubs/webPubSubhub1 // ``` type Hub struct { pulumi.CustomResourceState // Is anonymous connections are allowed for this hub? Defaults to `false`. // Possible values are `true`, `false`. AnonymousConnectionsEnabled pulumi.BoolPtrOutput `pulumi:"anonymousConnectionsEnabled"` // An `eventHandler` block as defined below. // // > **Note:** User can change the order of `eventHandler` to change the priority accordingly. EventHandlers HubEventHandlerArrayOutput `pulumi:"eventHandlers"` // An `eventListener` block as defined below. // // > **Note:** The managed identity of Web PubSub service must be enabled and the identity must have the "Azure Event Hubs Data sender" role to access the Event Hub. EventListeners HubEventListenerArrayOutput `pulumi:"eventListeners"` // The name of the Web Pubsub hub service. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the id of the Web Pubsub. Changing this forces a new resource to be created. WebPubsubId pulumi.StringOutput `pulumi:"webPubsubId"` } // NewHub registers a new resource with the given unique name, arguments, and options. func NewHub(ctx *pulumi.Context, name string, args *HubArgs, opts ...pulumi.ResourceOption) (*Hub, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.WebPubsubId == nil { return nil, errors.New("invalid value for required argument 'WebPubsubId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Hub err := ctx.RegisterResource("azure:webpubsub/hub:Hub", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetHub gets an existing Hub 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 GetHub(ctx *pulumi.Context, name string, id pulumi.IDInput, state *HubState, opts ...pulumi.ResourceOption) (*Hub, error) { var resource Hub err := ctx.ReadResource("azure:webpubsub/hub:Hub", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Hub resources. type hubState struct { // Is anonymous connections are allowed for this hub? Defaults to `false`. // Possible values are `true`, `false`. AnonymousConnectionsEnabled *bool `pulumi:"anonymousConnectionsEnabled"` // An `eventHandler` block as defined below. // // > **Note:** User can change the order of `eventHandler` to change the priority accordingly. EventHandlers []HubEventHandler `pulumi:"eventHandlers"` // An `eventListener` block as defined below. // // > **Note:** The managed identity of Web PubSub service must be enabled and the identity must have the "Azure Event Hubs Data sender" role to access the Event Hub. EventListeners []HubEventListener `pulumi:"eventListeners"` // The name of the Web Pubsub hub service. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the id of the Web Pubsub. Changing this forces a new resource to be created. WebPubsubId *string `pulumi:"webPubsubId"` } type HubState struct { // Is anonymous connections are allowed for this hub? Defaults to `false`. // Possible values are `true`, `false`. AnonymousConnectionsEnabled pulumi.BoolPtrInput // An `eventHandler` block as defined below. // // > **Note:** User can change the order of `eventHandler` to change the priority accordingly. EventHandlers HubEventHandlerArrayInput // An `eventListener` block as defined below. // // > **Note:** The managed identity of Web PubSub service must be enabled and the identity must have the "Azure Event Hubs Data sender" role to access the Event Hub. EventListeners HubEventListenerArrayInput // The name of the Web Pubsub hub service. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the id of the Web Pubsub. Changing this forces a new resource to be created. WebPubsubId pulumi.StringPtrInput } func (HubState) ElementType() reflect.Type { return reflect.TypeOf((*hubState)(nil)).Elem() } type hubArgs struct { // Is anonymous connections are allowed for this hub? Defaults to `false`. // Possible values are `true`, `false`. AnonymousConnectionsEnabled *bool `pulumi:"anonymousConnectionsEnabled"` // An `eventHandler` block as defined below. // // > **Note:** User can change the order of `eventHandler` to change the priority accordingly. EventHandlers []HubEventHandler `pulumi:"eventHandlers"` // An `eventListener` block as defined below. // // > **Note:** The managed identity of Web PubSub service must be enabled and the identity must have the "Azure Event Hubs Data sender" role to access the Event Hub. EventListeners []HubEventListener `pulumi:"eventListeners"` // The name of the Web Pubsub hub service. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the id of the Web Pubsub. Changing this forces a new resource to be created. WebPubsubId string `pulumi:"webPubsubId"` } // The set of arguments for constructing a Hub resource. type HubArgs struct { // Is anonymous connections are allowed for this hub? Defaults to `false`. // Possible values are `true`, `false`. AnonymousConnectionsEnabled pulumi.BoolPtrInput // An `eventHandler` block as defined below. // // > **Note:** User can change the order of `eventHandler` to change the priority accordingly. EventHandlers HubEventHandlerArrayInput // An `eventListener` block as defined below. // // > **Note:** The managed identity of Web PubSub service must be enabled and the identity must have the "Azure Event Hubs Data sender" role to access the Event Hub. EventListeners HubEventListenerArrayInput // The name of the Web Pubsub hub service. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the id of the Web Pubsub. Changing this forces a new resource to be created. WebPubsubId pulumi.StringInput } func (HubArgs) ElementType() reflect.Type { return reflect.TypeOf((*hubArgs)(nil)).Elem() } type HubInput interface { pulumi.Input ToHubOutput() HubOutput ToHubOutputWithContext(ctx context.Context) HubOutput } func (*Hub) ElementType() reflect.Type { return reflect.TypeOf((**Hub)(nil)).Elem() } func (i *Hub) ToHubOutput() HubOutput { return i.ToHubOutputWithContext(context.Background()) } func (i *Hub) ToHubOutputWithContext(ctx context.Context) HubOutput { return pulumi.ToOutputWithContext(ctx, i).(HubOutput) } // HubArrayInput is an input type that accepts HubArray and HubArrayOutput values. // You can construct a concrete instance of `HubArrayInput` via: // // HubArray{ HubArgs{...} } type HubArrayInput interface { pulumi.Input ToHubArrayOutput() HubArrayOutput ToHubArrayOutputWithContext(context.Context) HubArrayOutput } type HubArray []HubInput func (HubArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Hub)(nil)).Elem() } func (i HubArray) ToHubArrayOutput() HubArrayOutput { return i.ToHubArrayOutputWithContext(context.Background()) } func (i HubArray) ToHubArrayOutputWithContext(ctx context.Context) HubArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(HubArrayOutput) } // HubMapInput is an input type that accepts HubMap and HubMapOutput values. // You can construct a concrete instance of `HubMapInput` via: // // HubMap{ "key": HubArgs{...} } type HubMapInput interface { pulumi.Input ToHubMapOutput() HubMapOutput ToHubMapOutputWithContext(context.Context) HubMapOutput } type HubMap map[string]HubInput func (HubMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Hub)(nil)).Elem() } func (i HubMap) ToHubMapOutput() HubMapOutput { return i.ToHubMapOutputWithContext(context.Background()) } func (i HubMap) ToHubMapOutputWithContext(ctx context.Context) HubMapOutput { return pulumi.ToOutputWithContext(ctx, i).(HubMapOutput) } type HubOutput struct{ *pulumi.OutputState } func (HubOutput) ElementType() reflect.Type { return reflect.TypeOf((**Hub)(nil)).Elem() } func (o HubOutput) ToHubOutput() HubOutput { return o } func (o HubOutput) ToHubOutputWithContext(ctx context.Context) HubOutput { return o } // Is anonymous connections are allowed for this hub? Defaults to `false`. // Possible values are `true`, `false`. func (o HubOutput) AnonymousConnectionsEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Hub) pulumi.BoolPtrOutput { return v.AnonymousConnectionsEnabled }).(pulumi.BoolPtrOutput) } // An `eventHandler` block as defined below. // // > **Note:** User can change the order of `eventHandler` to change the priority accordingly. func (o HubOutput) EventHandlers() HubEventHandlerArrayOutput { return o.ApplyT(func(v *Hub) HubEventHandlerArrayOutput { return v.EventHandlers }).(HubEventHandlerArrayOutput) } // An `eventListener` block as defined below. // // > **Note:** The managed identity of Web PubSub service must be enabled and the identity must have the "Azure Event Hubs Data sender" role to access the Event Hub. func (o HubOutput) EventListeners() HubEventListenerArrayOutput { return o.ApplyT(func(v *Hub) HubEventListenerArrayOutput { return v.EventListeners }).(HubEventListenerArrayOutput) } // The name of the Web Pubsub hub service. Changing this forces a new resource to be created. func (o HubOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Hub) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the id of the Web Pubsub. Changing this forces a new resource to be created. func (o HubOutput) WebPubsubId() pulumi.StringOutput { return o.ApplyT(func(v *Hub) pulumi.StringOutput { return v.WebPubsubId }).(pulumi.StringOutput) } type HubArrayOutput struct{ *pulumi.OutputState } func (HubArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Hub)(nil)).Elem() } func (o HubArrayOutput) ToHubArrayOutput() HubArrayOutput { return o } func (o HubArrayOutput) ToHubArrayOutputWithContext(ctx context.Context) HubArrayOutput { return o } func (o HubArrayOutput) Index(i pulumi.IntInput) HubOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Hub { return vs[0].([]*Hub)[vs[1].(int)] }).(HubOutput) } type HubMapOutput struct{ *pulumi.OutputState } func (HubMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Hub)(nil)).Elem() } func (o HubMapOutput) ToHubMapOutput() HubMapOutput { return o } func (o HubMapOutput) ToHubMapOutputWithContext(ctx context.Context) HubMapOutput { return o } func (o HubMapOutput) MapIndex(k pulumi.StringInput) HubOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Hub { return vs[0].(map[string]*Hub)[vs[1].(string)] }).(HubOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*HubInput)(nil)).Elem(), &Hub{}) pulumi.RegisterInputType(reflect.TypeOf((*HubArrayInput)(nil)).Elem(), HubArray{}) pulumi.RegisterInputType(reflect.TypeOf((*HubMapInput)(nil)).Elem(), HubMap{}) pulumi.RegisterOutputType(HubOutput{}) pulumi.RegisterOutputType(HubArrayOutput{}) pulumi.RegisterOutputType(HubMapOutput{}) }
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/webpubsub/sharedPrivateLinkResource.go
sdk/go/azure/webpubsub/sharedPrivateLinkResource.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 webpubsub import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages the Shared Private Link Resource for a Web Pubsub service. // // ## 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/keyvault" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/webpubsub" // "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("terraform-webpubsub"), // Location: pulumi.String("east us"), // }) // 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("standard"), // SoftDeleteRetentionDays: pulumi.Int(7), // AccessPolicies: keyvault.KeyVaultAccessPolicyArray{ // &keyvault.KeyVaultAccessPolicyArgs{ // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // CertificatePermissions: pulumi.StringArray{ // pulumi.String("managecontacts"), // }, // KeyPermissions: pulumi.StringArray{ // pulumi.String("create"), // }, // SecretPermissions: pulumi.StringArray{ // pulumi.String("set"), // }, // }, // }, // }) // if err != nil { // return err // } // exampleService, err := webpubsub.NewService(ctx, "example", &webpubsub.ServiceArgs{ // Name: pulumi.String("tfex-webpubsub"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("Standard_S1"), // Capacity: pulumi.Int(1), // }) // if err != nil { // return err // } // _, err = webpubsub.NewSharedPrivateLinkResource(ctx, "example", &webpubsub.SharedPrivateLinkResourceArgs{ // Name: pulumi.String("tfex-webpubsub-splr"), // WebPubsubId: exampleService.ID(), // SubresourceName: pulumi.String("vault"), // TargetResourceId: exampleKeyVault.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.SignalRService` - 2024-03-01 // // ## Import // // Web Pubsub Shared Private Link Resource can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:webpubsub/sharedPrivateLinkResource:SharedPrivateLinkResource example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SignalRService/webPubSub/webPubSub1/sharedPrivateLinkResources/resource1 // ``` type SharedPrivateLinkResource struct { pulumi.CustomResourceState // Specify the name of the Web Pubsub Shared Private Link Resource. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specify the request message for requesting approval of the Shared Private Link Enabled Remote Resource. RequestMessage pulumi.StringPtrOutput `pulumi:"requestMessage"` // The status of a private endpoint connection. Possible values are Pending, Approved, Rejected or Disconnected. Status pulumi.StringOutput `pulumi:"status"` // Specify the sub resource name which the Web Pubsub Private Endpoint is able to connect to. Changing this forces a new resource to be created. // // > **Note:** The available sub resource can be retrieved by using `webpubsub.getPrivateLinkResource` data source. SubresourceName pulumi.StringOutput `pulumi:"subresourceName"` // Specify the ID of the Shared Private Link Enabled Remote Resource which this Web Pubsub Private Endpoint should be connected to. Changing this forces a new resource to be created. // // > **Note:** The sub resource name should match with the type of the target resource id that's being specified. TargetResourceId pulumi.StringOutput `pulumi:"targetResourceId"` // Specify the id of the Web Pubsub. Changing this forces a new resource to be created. WebPubsubId pulumi.StringOutput `pulumi:"webPubsubId"` } // NewSharedPrivateLinkResource registers a new resource with the given unique name, arguments, and options. func NewSharedPrivateLinkResource(ctx *pulumi.Context, name string, args *SharedPrivateLinkResourceArgs, opts ...pulumi.ResourceOption) (*SharedPrivateLinkResource, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.SubresourceName == nil { return nil, errors.New("invalid value for required argument 'SubresourceName'") } if args.TargetResourceId == nil { return nil, errors.New("invalid value for required argument 'TargetResourceId'") } if args.WebPubsubId == nil { return nil, errors.New("invalid value for required argument 'WebPubsubId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SharedPrivateLinkResource err := ctx.RegisterResource("azure:webpubsub/sharedPrivateLinkResource:SharedPrivateLinkResource", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSharedPrivateLinkResource gets an existing SharedPrivateLinkResource 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 GetSharedPrivateLinkResource(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SharedPrivateLinkResourceState, opts ...pulumi.ResourceOption) (*SharedPrivateLinkResource, error) { var resource SharedPrivateLinkResource err := ctx.ReadResource("azure:webpubsub/sharedPrivateLinkResource:SharedPrivateLinkResource", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SharedPrivateLinkResource resources. type sharedPrivateLinkResourceState struct { // Specify the name of the Web Pubsub Shared Private Link Resource. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specify the request message for requesting approval of the Shared Private Link Enabled Remote Resource. RequestMessage *string `pulumi:"requestMessage"` // The status of a private endpoint connection. Possible values are Pending, Approved, Rejected or Disconnected. Status *string `pulumi:"status"` // Specify the sub resource name which the Web Pubsub Private Endpoint is able to connect to. Changing this forces a new resource to be created. // // > **Note:** The available sub resource can be retrieved by using `webpubsub.getPrivateLinkResource` data source. SubresourceName *string `pulumi:"subresourceName"` // Specify the ID of the Shared Private Link Enabled Remote Resource which this Web Pubsub Private Endpoint should be connected to. Changing this forces a new resource to be created. // // > **Note:** The sub resource name should match with the type of the target resource id that's being specified. TargetResourceId *string `pulumi:"targetResourceId"` // Specify the id of the Web Pubsub. Changing this forces a new resource to be created. WebPubsubId *string `pulumi:"webPubsubId"` } type SharedPrivateLinkResourceState struct { // Specify the name of the Web Pubsub Shared Private Link Resource. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specify the request message for requesting approval of the Shared Private Link Enabled Remote Resource. RequestMessage pulumi.StringPtrInput // The status of a private endpoint connection. Possible values are Pending, Approved, Rejected or Disconnected. Status pulumi.StringPtrInput // Specify the sub resource name which the Web Pubsub Private Endpoint is able to connect to. Changing this forces a new resource to be created. // // > **Note:** The available sub resource can be retrieved by using `webpubsub.getPrivateLinkResource` data source. SubresourceName pulumi.StringPtrInput // Specify the ID of the Shared Private Link Enabled Remote Resource which this Web Pubsub Private Endpoint should be connected to. Changing this forces a new resource to be created. // // > **Note:** The sub resource name should match with the type of the target resource id that's being specified. TargetResourceId pulumi.StringPtrInput // Specify the id of the Web Pubsub. Changing this forces a new resource to be created. WebPubsubId pulumi.StringPtrInput } func (SharedPrivateLinkResourceState) ElementType() reflect.Type { return reflect.TypeOf((*sharedPrivateLinkResourceState)(nil)).Elem() } type sharedPrivateLinkResourceArgs struct { // Specify the name of the Web Pubsub Shared Private Link Resource. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specify the request message for requesting approval of the Shared Private Link Enabled Remote Resource. RequestMessage *string `pulumi:"requestMessage"` // Specify the sub resource name which the Web Pubsub Private Endpoint is able to connect to. Changing this forces a new resource to be created. // // > **Note:** The available sub resource can be retrieved by using `webpubsub.getPrivateLinkResource` data source. SubresourceName string `pulumi:"subresourceName"` // Specify the ID of the Shared Private Link Enabled Remote Resource which this Web Pubsub Private Endpoint should be connected to. Changing this forces a new resource to be created. // // > **Note:** The sub resource name should match with the type of the target resource id that's being specified. TargetResourceId string `pulumi:"targetResourceId"` // Specify the id of the Web Pubsub. Changing this forces a new resource to be created. WebPubsubId string `pulumi:"webPubsubId"` } // The set of arguments for constructing a SharedPrivateLinkResource resource. type SharedPrivateLinkResourceArgs struct { // Specify the name of the Web Pubsub Shared Private Link Resource. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specify the request message for requesting approval of the Shared Private Link Enabled Remote Resource. RequestMessage pulumi.StringPtrInput // Specify the sub resource name which the Web Pubsub Private Endpoint is able to connect to. Changing this forces a new resource to be created. // // > **Note:** The available sub resource can be retrieved by using `webpubsub.getPrivateLinkResource` data source. SubresourceName pulumi.StringInput // Specify the ID of the Shared Private Link Enabled Remote Resource which this Web Pubsub Private Endpoint should be connected to. Changing this forces a new resource to be created. // // > **Note:** The sub resource name should match with the type of the target resource id that's being specified. TargetResourceId pulumi.StringInput // Specify the id of the Web Pubsub. Changing this forces a new resource to be created. WebPubsubId pulumi.StringInput } func (SharedPrivateLinkResourceArgs) ElementType() reflect.Type { return reflect.TypeOf((*sharedPrivateLinkResourceArgs)(nil)).Elem() } type SharedPrivateLinkResourceInput interface { pulumi.Input ToSharedPrivateLinkResourceOutput() SharedPrivateLinkResourceOutput ToSharedPrivateLinkResourceOutputWithContext(ctx context.Context) SharedPrivateLinkResourceOutput } func (*SharedPrivateLinkResource) ElementType() reflect.Type { return reflect.TypeOf((**SharedPrivateLinkResource)(nil)).Elem() } func (i *SharedPrivateLinkResource) ToSharedPrivateLinkResourceOutput() SharedPrivateLinkResourceOutput { return i.ToSharedPrivateLinkResourceOutputWithContext(context.Background()) } func (i *SharedPrivateLinkResource) ToSharedPrivateLinkResourceOutputWithContext(ctx context.Context) SharedPrivateLinkResourceOutput { return pulumi.ToOutputWithContext(ctx, i).(SharedPrivateLinkResourceOutput) } // SharedPrivateLinkResourceArrayInput is an input type that accepts SharedPrivateLinkResourceArray and SharedPrivateLinkResourceArrayOutput values. // You can construct a concrete instance of `SharedPrivateLinkResourceArrayInput` via: // // SharedPrivateLinkResourceArray{ SharedPrivateLinkResourceArgs{...} } type SharedPrivateLinkResourceArrayInput interface { pulumi.Input ToSharedPrivateLinkResourceArrayOutput() SharedPrivateLinkResourceArrayOutput ToSharedPrivateLinkResourceArrayOutputWithContext(context.Context) SharedPrivateLinkResourceArrayOutput } type SharedPrivateLinkResourceArray []SharedPrivateLinkResourceInput func (SharedPrivateLinkResourceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SharedPrivateLinkResource)(nil)).Elem() } func (i SharedPrivateLinkResourceArray) ToSharedPrivateLinkResourceArrayOutput() SharedPrivateLinkResourceArrayOutput { return i.ToSharedPrivateLinkResourceArrayOutputWithContext(context.Background()) } func (i SharedPrivateLinkResourceArray) ToSharedPrivateLinkResourceArrayOutputWithContext(ctx context.Context) SharedPrivateLinkResourceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SharedPrivateLinkResourceArrayOutput) } // SharedPrivateLinkResourceMapInput is an input type that accepts SharedPrivateLinkResourceMap and SharedPrivateLinkResourceMapOutput values. // You can construct a concrete instance of `SharedPrivateLinkResourceMapInput` via: // // SharedPrivateLinkResourceMap{ "key": SharedPrivateLinkResourceArgs{...} } type SharedPrivateLinkResourceMapInput interface { pulumi.Input ToSharedPrivateLinkResourceMapOutput() SharedPrivateLinkResourceMapOutput ToSharedPrivateLinkResourceMapOutputWithContext(context.Context) SharedPrivateLinkResourceMapOutput } type SharedPrivateLinkResourceMap map[string]SharedPrivateLinkResourceInput func (SharedPrivateLinkResourceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SharedPrivateLinkResource)(nil)).Elem() } func (i SharedPrivateLinkResourceMap) ToSharedPrivateLinkResourceMapOutput() SharedPrivateLinkResourceMapOutput { return i.ToSharedPrivateLinkResourceMapOutputWithContext(context.Background()) } func (i SharedPrivateLinkResourceMap) ToSharedPrivateLinkResourceMapOutputWithContext(ctx context.Context) SharedPrivateLinkResourceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SharedPrivateLinkResourceMapOutput) } type SharedPrivateLinkResourceOutput struct{ *pulumi.OutputState } func (SharedPrivateLinkResourceOutput) ElementType() reflect.Type { return reflect.TypeOf((**SharedPrivateLinkResource)(nil)).Elem() } func (o SharedPrivateLinkResourceOutput) ToSharedPrivateLinkResourceOutput() SharedPrivateLinkResourceOutput { return o } func (o SharedPrivateLinkResourceOutput) ToSharedPrivateLinkResourceOutputWithContext(ctx context.Context) SharedPrivateLinkResourceOutput { return o } // Specify the name of the Web Pubsub Shared Private Link Resource. Changing this forces a new resource to be created. func (o SharedPrivateLinkResourceOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SharedPrivateLinkResource) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specify the request message for requesting approval of the Shared Private Link Enabled Remote Resource. func (o SharedPrivateLinkResourceOutput) RequestMessage() pulumi.StringPtrOutput { return o.ApplyT(func(v *SharedPrivateLinkResource) pulumi.StringPtrOutput { return v.RequestMessage }).(pulumi.StringPtrOutput) } // The status of a private endpoint connection. Possible values are Pending, Approved, Rejected or Disconnected. func (o SharedPrivateLinkResourceOutput) Status() pulumi.StringOutput { return o.ApplyT(func(v *SharedPrivateLinkResource) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput) } // Specify the sub resource name which the Web Pubsub Private Endpoint is able to connect to. Changing this forces a new resource to be created. // // > **Note:** The available sub resource can be retrieved by using `webpubsub.getPrivateLinkResource` data source. func (o SharedPrivateLinkResourceOutput) SubresourceName() pulumi.StringOutput { return o.ApplyT(func(v *SharedPrivateLinkResource) pulumi.StringOutput { return v.SubresourceName }).(pulumi.StringOutput) } // Specify the ID of the Shared Private Link Enabled Remote Resource which this Web Pubsub Private Endpoint should be connected to. Changing this forces a new resource to be created. // // > **Note:** The sub resource name should match with the type of the target resource id that's being specified. func (o SharedPrivateLinkResourceOutput) TargetResourceId() pulumi.StringOutput { return o.ApplyT(func(v *SharedPrivateLinkResource) pulumi.StringOutput { return v.TargetResourceId }).(pulumi.StringOutput) } // Specify the id of the Web Pubsub. Changing this forces a new resource to be created. func (o SharedPrivateLinkResourceOutput) WebPubsubId() pulumi.StringOutput { return o.ApplyT(func(v *SharedPrivateLinkResource) pulumi.StringOutput { return v.WebPubsubId }).(pulumi.StringOutput) } type SharedPrivateLinkResourceArrayOutput struct{ *pulumi.OutputState } func (SharedPrivateLinkResourceArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SharedPrivateLinkResource)(nil)).Elem() } func (o SharedPrivateLinkResourceArrayOutput) ToSharedPrivateLinkResourceArrayOutput() SharedPrivateLinkResourceArrayOutput { return o } func (o SharedPrivateLinkResourceArrayOutput) ToSharedPrivateLinkResourceArrayOutputWithContext(ctx context.Context) SharedPrivateLinkResourceArrayOutput { return o } func (o SharedPrivateLinkResourceArrayOutput) Index(i pulumi.IntInput) SharedPrivateLinkResourceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SharedPrivateLinkResource { return vs[0].([]*SharedPrivateLinkResource)[vs[1].(int)] }).(SharedPrivateLinkResourceOutput) } type SharedPrivateLinkResourceMapOutput struct{ *pulumi.OutputState } func (SharedPrivateLinkResourceMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SharedPrivateLinkResource)(nil)).Elem() } func (o SharedPrivateLinkResourceMapOutput) ToSharedPrivateLinkResourceMapOutput() SharedPrivateLinkResourceMapOutput { return o } func (o SharedPrivateLinkResourceMapOutput) ToSharedPrivateLinkResourceMapOutputWithContext(ctx context.Context) SharedPrivateLinkResourceMapOutput { return o } func (o SharedPrivateLinkResourceMapOutput) MapIndex(k pulumi.StringInput) SharedPrivateLinkResourceOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SharedPrivateLinkResource { return vs[0].(map[string]*SharedPrivateLinkResource)[vs[1].(string)] }).(SharedPrivateLinkResourceOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SharedPrivateLinkResourceInput)(nil)).Elem(), &SharedPrivateLinkResource{}) pulumi.RegisterInputType(reflect.TypeOf((*SharedPrivateLinkResourceArrayInput)(nil)).Elem(), SharedPrivateLinkResourceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SharedPrivateLinkResourceMapInput)(nil)).Elem(), SharedPrivateLinkResourceMap{}) pulumi.RegisterOutputType(SharedPrivateLinkResourceOutput{}) pulumi.RegisterOutputType(SharedPrivateLinkResourceArrayOutput{}) pulumi.RegisterOutputType(SharedPrivateLinkResourceMapOutput{}) }
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/webpubsub/getPrivateLinkResource.go
sdk/go/azure/webpubsub/getPrivateLinkResource.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 webpubsub 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 the Private Link Resource supported by the Web Pubsub 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/webpubsub" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // testResourceGroup, err := core.NewResourceGroup(ctx, "test", &core.ResourceGroupArgs{ // Name: pulumi.String("terraform-webpubsub"), // Location: pulumi.String("east us"), // }) // if err != nil { // return err // } // testService, err := webpubsub.NewService(ctx, "test", &webpubsub.ServiceArgs{ // Name: pulumi.String("tfex-webpubsub"), // Location: testResourceGroup.Location, // ResourceGroupName: testResourceGroup.Name, // Sku: pulumi.String("Standard_S1"), // Capacity: pulumi.Int(1), // }) // if err != nil { // return err // } // _ = webpubsub.GetPrivateLinkResourceOutput(ctx, webpubsub.GetPrivateLinkResourceOutputArgs{ // WebPubsubId: testService.ID(), // }, nil) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.SignalRService` - 2024-03-01 func GetPrivateLinkResource(ctx *pulumi.Context, args *GetPrivateLinkResourceArgs, opts ...pulumi.InvokeOption) (*GetPrivateLinkResourceResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetPrivateLinkResourceResult err := ctx.Invoke("azure:webpubsub/getPrivateLinkResource:getPrivateLinkResource", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getPrivateLinkResource. type GetPrivateLinkResourceArgs struct { // The ID of an existing Web Pubsub Resource which Private Link Resource should be retrieved for. WebPubsubId string `pulumi:"webPubsubId"` } // A collection of values returned by getPrivateLinkResource. type GetPrivateLinkResourceResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // A `sharedPrivateLinkResourceTypes` block as defined below. SharedPrivateLinkResourceTypes []GetPrivateLinkResourceSharedPrivateLinkResourceType `pulumi:"sharedPrivateLinkResourceTypes"` WebPubsubId string `pulumi:"webPubsubId"` } func GetPrivateLinkResourceOutput(ctx *pulumi.Context, args GetPrivateLinkResourceOutputArgs, opts ...pulumi.InvokeOption) GetPrivateLinkResourceResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetPrivateLinkResourceResultOutput, error) { args := v.(GetPrivateLinkResourceArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:webpubsub/getPrivateLinkResource:getPrivateLinkResource", args, GetPrivateLinkResourceResultOutput{}, options).(GetPrivateLinkResourceResultOutput), nil }).(GetPrivateLinkResourceResultOutput) } // A collection of arguments for invoking getPrivateLinkResource. type GetPrivateLinkResourceOutputArgs struct { // The ID of an existing Web Pubsub Resource which Private Link Resource should be retrieved for. WebPubsubId pulumi.StringInput `pulumi:"webPubsubId"` } func (GetPrivateLinkResourceOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetPrivateLinkResourceArgs)(nil)).Elem() } // A collection of values returned by getPrivateLinkResource. type GetPrivateLinkResourceResultOutput struct{ *pulumi.OutputState } func (GetPrivateLinkResourceResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetPrivateLinkResourceResult)(nil)).Elem() } func (o GetPrivateLinkResourceResultOutput) ToGetPrivateLinkResourceResultOutput() GetPrivateLinkResourceResultOutput { return o } func (o GetPrivateLinkResourceResultOutput) ToGetPrivateLinkResourceResultOutputWithContext(ctx context.Context) GetPrivateLinkResourceResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o GetPrivateLinkResourceResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetPrivateLinkResourceResult) string { return v.Id }).(pulumi.StringOutput) } // A `sharedPrivateLinkResourceTypes` block as defined below. func (o GetPrivateLinkResourceResultOutput) SharedPrivateLinkResourceTypes() GetPrivateLinkResourceSharedPrivateLinkResourceTypeArrayOutput { return o.ApplyT(func(v GetPrivateLinkResourceResult) []GetPrivateLinkResourceSharedPrivateLinkResourceType { return v.SharedPrivateLinkResourceTypes }).(GetPrivateLinkResourceSharedPrivateLinkResourceTypeArrayOutput) } func (o GetPrivateLinkResourceResultOutput) WebPubsubId() pulumi.StringOutput { return o.ApplyT(func(v GetPrivateLinkResourceResult) string { return v.WebPubsubId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetPrivateLinkResourceResultOutput{}) }
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/webpubsub/customCertificate.go
sdk/go/azure/webpubsub/customCertificate.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 webpubsub 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 Web PubSub Custom Certificate. // // ## 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/keyvault" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/webpubsub" // "github.com/pulumi/pulumi-azurerm/sdk/go/azurerm" // "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 { // 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 // } // exampleWebPubsubService, err := azurerm.NewWebPubsubService(ctx, "example", &azurerm.WebPubsubServiceArgs{ // Name: "example-webpubsub", // Location: testAzurermResourceGroup.Location, // ResourceGroupName: testAzurermResourceGroup.Name, // Sku: []map[string]interface{}{ // map[string]interface{}{ // "name": "Premium_P1", // "capacity": 1, // }, // }, // Identity: []map[string]interface{}{ // map[string]interface{}{ // "type": "SystemAssigned", // }, // }, // }) // 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"), // AccessPolicies: keyvault.KeyVaultAccessPolicyArray{ // &keyvault.KeyVaultAccessPolicyArgs{ // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // CertificatePermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Get"), // pulumi.String("List"), // }, // SecretPermissions: pulumi.StringArray{ // pulumi.String("Get"), // pulumi.String("List"), // }, // }, // &keyvault.KeyVaultAccessPolicyArgs{ // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.Any(testAzurermWebPubsubService.Identity[0].PrincipalId), // CertificatePermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Get"), // pulumi.String("List"), // }, // SecretPermissions: pulumi.StringArray{ // pulumi.String("Get"), // pulumi.String("List"), // }, // }, // }, // }) // if err != nil { // return err // } // invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{ // Input: "certificate-to-import.pfx", // }, nil) // if err != nil { // return err // } // exampleCertificate, err := keyvault.NewCertificate(ctx, "example", &keyvault.CertificateArgs{ // Name: pulumi.String("imported-cert"), // KeyVaultId: exampleKeyVault.ID(), // Certificate: &keyvault.CertificateCertificateArgs{ // Contents: pulumi.String(invokeFilebase64.Result), // Password: pulumi.String(""), // }, // }) // if err != nil { // return err // } // _, err = webpubsub.NewCustomCertificate(ctx, "test", &webpubsub.CustomCertificateArgs{ // Name: pulumi.String("example-cert"), // WebPubsubId: exampleWebPubsubService.Id, // CustomCertificateId: exampleCertificate.ID(), // }, pulumi.DependsOn([]pulumi.Resource{ // exampleAzurermKeyVaultAccessPolicy, // })) // 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.SignalRService` - 2024-03-01 // // ## Import // // Custom Certificate for a Web PubSub service can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:webpubsub/customCertificate:CustomCertificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SignalRService/webPubSub/WebPubsub1/customCertificates/cert1 // ``` type CustomCertificate struct { pulumi.CustomResourceState // The certificate version of the Web PubSub Custom Certificate. CertificateVersion pulumi.StringOutput `pulumi:"certificateVersion"` // The certificate ID of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. // // > **Note:** Self assigned certificate is not supported and the provisioning status will fail. CustomCertificateId pulumi.StringOutput `pulumi:"customCertificateId"` // The name of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The Web PubSub ID of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. // // > **Note:** custom certificate is only available for Web PubSub Premium tier. Please enable managed identity in the corresponding Web PubSub Service and give the managed identity access to the key vault, the required permission is Get Certificate and Secret. WebPubsubId pulumi.StringOutput `pulumi:"webPubsubId"` } // NewCustomCertificate registers a new resource with the given unique name, arguments, and options. func NewCustomCertificate(ctx *pulumi.Context, name string, args *CustomCertificateArgs, opts ...pulumi.ResourceOption) (*CustomCertificate, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.CustomCertificateId == nil { return nil, errors.New("invalid value for required argument 'CustomCertificateId'") } if args.WebPubsubId == nil { return nil, errors.New("invalid value for required argument 'WebPubsubId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource CustomCertificate err := ctx.RegisterResource("azure:webpubsub/customCertificate:CustomCertificate", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetCustomCertificate gets an existing CustomCertificate 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 GetCustomCertificate(ctx *pulumi.Context, name string, id pulumi.IDInput, state *CustomCertificateState, opts ...pulumi.ResourceOption) (*CustomCertificate, error) { var resource CustomCertificate err := ctx.ReadResource("azure:webpubsub/customCertificate:CustomCertificate", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering CustomCertificate resources. type customCertificateState struct { // The certificate version of the Web PubSub Custom Certificate. CertificateVersion *string `pulumi:"certificateVersion"` // The certificate ID of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. // // > **Note:** Self assigned certificate is not supported and the provisioning status will fail. CustomCertificateId *string `pulumi:"customCertificateId"` // The name of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The Web PubSub ID of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. // // > **Note:** custom certificate is only available for Web PubSub Premium tier. Please enable managed identity in the corresponding Web PubSub Service and give the managed identity access to the key vault, the required permission is Get Certificate and Secret. WebPubsubId *string `pulumi:"webPubsubId"` } type CustomCertificateState struct { // The certificate version of the Web PubSub Custom Certificate. CertificateVersion pulumi.StringPtrInput // The certificate ID of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. // // > **Note:** Self assigned certificate is not supported and the provisioning status will fail. CustomCertificateId pulumi.StringPtrInput // The name of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The Web PubSub ID of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. // // > **Note:** custom certificate is only available for Web PubSub Premium tier. Please enable managed identity in the corresponding Web PubSub Service and give the managed identity access to the key vault, the required permission is Get Certificate and Secret. WebPubsubId pulumi.StringPtrInput } func (CustomCertificateState) ElementType() reflect.Type { return reflect.TypeOf((*customCertificateState)(nil)).Elem() } type customCertificateArgs struct { // The certificate ID of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. // // > **Note:** Self assigned certificate is not supported and the provisioning status will fail. CustomCertificateId string `pulumi:"customCertificateId"` // The name of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The Web PubSub ID of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. // // > **Note:** custom certificate is only available for Web PubSub Premium tier. Please enable managed identity in the corresponding Web PubSub Service and give the managed identity access to the key vault, the required permission is Get Certificate and Secret. WebPubsubId string `pulumi:"webPubsubId"` } // The set of arguments for constructing a CustomCertificate resource. type CustomCertificateArgs struct { // The certificate ID of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. // // > **Note:** Self assigned certificate is not supported and the provisioning status will fail. CustomCertificateId pulumi.StringInput // The name of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The Web PubSub ID of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. // // > **Note:** custom certificate is only available for Web PubSub Premium tier. Please enable managed identity in the corresponding Web PubSub Service and give the managed identity access to the key vault, the required permission is Get Certificate and Secret. WebPubsubId pulumi.StringInput } func (CustomCertificateArgs) ElementType() reflect.Type { return reflect.TypeOf((*customCertificateArgs)(nil)).Elem() } type CustomCertificateInput interface { pulumi.Input ToCustomCertificateOutput() CustomCertificateOutput ToCustomCertificateOutputWithContext(ctx context.Context) CustomCertificateOutput } func (*CustomCertificate) ElementType() reflect.Type { return reflect.TypeOf((**CustomCertificate)(nil)).Elem() } func (i *CustomCertificate) ToCustomCertificateOutput() CustomCertificateOutput { return i.ToCustomCertificateOutputWithContext(context.Background()) } func (i *CustomCertificate) ToCustomCertificateOutputWithContext(ctx context.Context) CustomCertificateOutput { return pulumi.ToOutputWithContext(ctx, i).(CustomCertificateOutput) } // CustomCertificateArrayInput is an input type that accepts CustomCertificateArray and CustomCertificateArrayOutput values. // You can construct a concrete instance of `CustomCertificateArrayInput` via: // // CustomCertificateArray{ CustomCertificateArgs{...} } type CustomCertificateArrayInput interface { pulumi.Input ToCustomCertificateArrayOutput() CustomCertificateArrayOutput ToCustomCertificateArrayOutputWithContext(context.Context) CustomCertificateArrayOutput } type CustomCertificateArray []CustomCertificateInput func (CustomCertificateArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*CustomCertificate)(nil)).Elem() } func (i CustomCertificateArray) ToCustomCertificateArrayOutput() CustomCertificateArrayOutput { return i.ToCustomCertificateArrayOutputWithContext(context.Background()) } func (i CustomCertificateArray) ToCustomCertificateArrayOutputWithContext(ctx context.Context) CustomCertificateArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CustomCertificateArrayOutput) } // CustomCertificateMapInput is an input type that accepts CustomCertificateMap and CustomCertificateMapOutput values. // You can construct a concrete instance of `CustomCertificateMapInput` via: // // CustomCertificateMap{ "key": CustomCertificateArgs{...} } type CustomCertificateMapInput interface { pulumi.Input ToCustomCertificateMapOutput() CustomCertificateMapOutput ToCustomCertificateMapOutputWithContext(context.Context) CustomCertificateMapOutput } type CustomCertificateMap map[string]CustomCertificateInput func (CustomCertificateMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CustomCertificate)(nil)).Elem() } func (i CustomCertificateMap) ToCustomCertificateMapOutput() CustomCertificateMapOutput { return i.ToCustomCertificateMapOutputWithContext(context.Background()) } func (i CustomCertificateMap) ToCustomCertificateMapOutputWithContext(ctx context.Context) CustomCertificateMapOutput { return pulumi.ToOutputWithContext(ctx, i).(CustomCertificateMapOutput) } type CustomCertificateOutput struct{ *pulumi.OutputState } func (CustomCertificateOutput) ElementType() reflect.Type { return reflect.TypeOf((**CustomCertificate)(nil)).Elem() } func (o CustomCertificateOutput) ToCustomCertificateOutput() CustomCertificateOutput { return o } func (o CustomCertificateOutput) ToCustomCertificateOutputWithContext(ctx context.Context) CustomCertificateOutput { return o } // The certificate version of the Web PubSub Custom Certificate. func (o CustomCertificateOutput) CertificateVersion() pulumi.StringOutput { return o.ApplyT(func(v *CustomCertificate) pulumi.StringOutput { return v.CertificateVersion }).(pulumi.StringOutput) } // The certificate ID of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. // // > **Note:** Self assigned certificate is not supported and the provisioning status will fail. func (o CustomCertificateOutput) CustomCertificateId() pulumi.StringOutput { return o.ApplyT(func(v *CustomCertificate) pulumi.StringOutput { return v.CustomCertificateId }).(pulumi.StringOutput) } // The name of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. func (o CustomCertificateOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *CustomCertificate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The Web PubSub ID of the Web PubSub Custom Certificate. Changing this forces a new resource to be created. // // > **Note:** custom certificate is only available for Web PubSub Premium tier. Please enable managed identity in the corresponding Web PubSub Service and give the managed identity access to the key vault, the required permission is Get Certificate and Secret. func (o CustomCertificateOutput) WebPubsubId() pulumi.StringOutput { return o.ApplyT(func(v *CustomCertificate) pulumi.StringOutput { return v.WebPubsubId }).(pulumi.StringOutput) } type CustomCertificateArrayOutput struct{ *pulumi.OutputState } func (CustomCertificateArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*CustomCertificate)(nil)).Elem() } func (o CustomCertificateArrayOutput) ToCustomCertificateArrayOutput() CustomCertificateArrayOutput { return o } func (o CustomCertificateArrayOutput) ToCustomCertificateArrayOutputWithContext(ctx context.Context) CustomCertificateArrayOutput { return o } func (o CustomCertificateArrayOutput) Index(i pulumi.IntInput) CustomCertificateOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CustomCertificate { return vs[0].([]*CustomCertificate)[vs[1].(int)] }).(CustomCertificateOutput) } type CustomCertificateMapOutput struct{ *pulumi.OutputState } func (CustomCertificateMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CustomCertificate)(nil)).Elem() } func (o CustomCertificateMapOutput) ToCustomCertificateMapOutput() CustomCertificateMapOutput { return o } func (o CustomCertificateMapOutput) ToCustomCertificateMapOutputWithContext(ctx context.Context) CustomCertificateMapOutput { return o } func (o CustomCertificateMapOutput) MapIndex(k pulumi.StringInput) CustomCertificateOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CustomCertificate { return vs[0].(map[string]*CustomCertificate)[vs[1].(string)] }).(CustomCertificateOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*CustomCertificateInput)(nil)).Elem(), &CustomCertificate{}) pulumi.RegisterInputType(reflect.TypeOf((*CustomCertificateArrayInput)(nil)).Elem(), CustomCertificateArray{}) pulumi.RegisterInputType(reflect.TypeOf((*CustomCertificateMapInput)(nil)).Elem(), CustomCertificateMap{}) pulumi.RegisterOutputType(CustomCertificateOutput{}) pulumi.RegisterOutputType(CustomCertificateArrayOutput{}) pulumi.RegisterOutputType(CustomCertificateMapOutput{}) }
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/webpubsub/socketio.go
sdk/go/azure/webpubsub/socketio.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 webpubsub import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Web PubSub Service for Socket.IO. // // ## 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/webpubsub" // "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"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = webpubsub.NewSocketio(ctx, "example", &webpubsub.SocketioArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // Sku: "Free_F1"[0], // }) // 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.SignalRService` - 2024-03-01 // // ## Import // // Web PubSub Service for Socket.IOs can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:webpubsub/socketio:Socketio example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SignalRService/webPubSub/pubsub1 // ``` type Socketio struct { pulumi.CustomResourceState // Whether Azure Active Directory authentication is enabled. Defaults to `true`. AadAuthEnabled pulumi.BoolPtrOutput `pulumi:"aadAuthEnabled"` // The publicly accessible IP address of the Web PubSub Service. ExternalIp pulumi.StringOutput `pulumi:"externalIp"` // The FQDN of the Web PubSub Service. Hostname pulumi.StringOutput `pulumi:"hostname"` // An `identity` block as defined below. Identity SocketioIdentityPtrOutput `pulumi:"identity"` // Whether the connectivity log category for live trace is enabled. Defaults to `true`. LiveTraceConnectivityLogsEnabled pulumi.BoolPtrOutput `pulumi:"liveTraceConnectivityLogsEnabled"` // Whether the live trace tool is enabled. Defaults to `true`. LiveTraceEnabled pulumi.BoolPtrOutput `pulumi:"liveTraceEnabled"` // Whether the HTTP request log category for live trace is enabled. Defaults to `true`. LiveTraceHttpRequestLogsEnabled pulumi.BoolPtrOutput `pulumi:"liveTraceHttpRequestLogsEnabled"` // Whether the messaging log category for live trace is enabled. Defaults to `true`. LiveTraceMessagingLogsEnabled pulumi.BoolPtrOutput `pulumi:"liveTraceMessagingLogsEnabled"` // Whether local authentication using an access key is enabled. Defaults to `true`. LocalAuthEnabled pulumi.BoolPtrOutput `pulumi:"localAuthEnabled"` // The Azure Region where the Web PubSub Service should exist. Changing this forces a new Web PubSub Service to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Web PubSub Service. Changing this forces a new Web PubSub Service to be created. Name pulumi.StringOutput `pulumi:"name"` // The primary access key for the Web PubSub Service. PrimaryAccessKey pulumi.StringOutput `pulumi:"primaryAccessKey"` // The primary connection string for the Web PubSub Service. PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"` // Whether public network access is enabled. Defaults to `Enabled`. Possible values are `Enabled` and `Disabled`. // // > **Note:** `publicNetworkAccess` cannot be set to `Disabled` when `sku` is `Free_F1`. PublicNetworkAccess pulumi.StringPtrOutput `pulumi:"publicNetworkAccess"` // The publicly accessible port for client-side usage of the Web PubSub Service. PublicPort pulumi.IntOutput `pulumi:"publicPort"` // The name of the Resource Group where the Web PubSub Service should exist. Changing this forces a new Web PubSub Service to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The secondary access key for the Web PubSub Service. SecondaryAccessKey pulumi.StringOutput `pulumi:"secondaryAccessKey"` // The secondary connection string for the Web PubSub Service. SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"` // The publicly accessible port for server-side usage of the Web PubSub Service. ServerPort pulumi.IntOutput `pulumi:"serverPort"` // The service mode of this Web PubSub Service. Defaults to `Default`. Possible values are `Default` and `Serverless`. ServiceMode pulumi.StringPtrOutput `pulumi:"serviceMode"` // One or more `sku` blocks as defined below. Sku SocketioSkuOutput `pulumi:"sku"` // A mapping of tags which should be assigned to the Web PubSub Service. Tags pulumi.StringMapOutput `pulumi:"tags"` // Whether the service should request a client certificate during a TLS handshake. Defaults to `false`. // // > **Note:** `tlsClientCertEnabled` cannot be set to `true` when `sku` is `Free_F1`. TlsClientCertEnabled pulumi.BoolPtrOutput `pulumi:"tlsClientCertEnabled"` } // NewSocketio registers a new resource with the given unique name, arguments, and options. func NewSocketio(ctx *pulumi.Context, name string, args *SocketioArgs, opts ...pulumi.ResourceOption) (*Socketio, 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'") } secrets := pulumi.AdditionalSecretOutputs([]string{ "primaryAccessKey", "primaryConnectionString", "secondaryAccessKey", "secondaryConnectionString", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource Socketio err := ctx.RegisterResource("azure:webpubsub/socketio:Socketio", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSocketio gets an existing Socketio 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 GetSocketio(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SocketioState, opts ...pulumi.ResourceOption) (*Socketio, error) { var resource Socketio err := ctx.ReadResource("azure:webpubsub/socketio:Socketio", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Socketio resources. type socketioState struct { // Whether Azure Active Directory authentication is enabled. Defaults to `true`. AadAuthEnabled *bool `pulumi:"aadAuthEnabled"` // The publicly accessible IP address of the Web PubSub Service. ExternalIp *string `pulumi:"externalIp"` // The FQDN of the Web PubSub Service. Hostname *string `pulumi:"hostname"` // An `identity` block as defined below. Identity *SocketioIdentity `pulumi:"identity"` // Whether the connectivity log category for live trace is enabled. Defaults to `true`. LiveTraceConnectivityLogsEnabled *bool `pulumi:"liveTraceConnectivityLogsEnabled"` // Whether the live trace tool is enabled. Defaults to `true`. LiveTraceEnabled *bool `pulumi:"liveTraceEnabled"` // Whether the HTTP request log category for live trace is enabled. Defaults to `true`. LiveTraceHttpRequestLogsEnabled *bool `pulumi:"liveTraceHttpRequestLogsEnabled"` // Whether the messaging log category for live trace is enabled. Defaults to `true`. LiveTraceMessagingLogsEnabled *bool `pulumi:"liveTraceMessagingLogsEnabled"` // Whether local authentication using an access key is enabled. Defaults to `true`. LocalAuthEnabled *bool `pulumi:"localAuthEnabled"` // The Azure Region where the Web PubSub Service should exist. Changing this forces a new Web PubSub Service to be created. Location *string `pulumi:"location"` // The name which should be used for this Web PubSub Service. Changing this forces a new Web PubSub Service to be created. Name *string `pulumi:"name"` // The primary access key for the Web PubSub Service. PrimaryAccessKey *string `pulumi:"primaryAccessKey"` // The primary connection string for the Web PubSub Service. PrimaryConnectionString *string `pulumi:"primaryConnectionString"` // Whether public network access is enabled. Defaults to `Enabled`. Possible values are `Enabled` and `Disabled`. // // > **Note:** `publicNetworkAccess` cannot be set to `Disabled` when `sku` is `Free_F1`. PublicNetworkAccess *string `pulumi:"publicNetworkAccess"` // The publicly accessible port for client-side usage of the Web PubSub Service. PublicPort *int `pulumi:"publicPort"` // The name of the Resource Group where the Web PubSub Service should exist. Changing this forces a new Web PubSub Service to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The secondary access key for the Web PubSub Service. SecondaryAccessKey *string `pulumi:"secondaryAccessKey"` // The secondary connection string for the Web PubSub Service. SecondaryConnectionString *string `pulumi:"secondaryConnectionString"` // The publicly accessible port for server-side usage of the Web PubSub Service. ServerPort *int `pulumi:"serverPort"` // The service mode of this Web PubSub Service. Defaults to `Default`. Possible values are `Default` and `Serverless`. ServiceMode *string `pulumi:"serviceMode"` // One or more `sku` blocks as defined below. Sku *SocketioSku `pulumi:"sku"` // A mapping of tags which should be assigned to the Web PubSub Service. Tags map[string]string `pulumi:"tags"` // Whether the service should request a client certificate during a TLS handshake. Defaults to `false`. // // > **Note:** `tlsClientCertEnabled` cannot be set to `true` when `sku` is `Free_F1`. TlsClientCertEnabled *bool `pulumi:"tlsClientCertEnabled"` } type SocketioState struct { // Whether Azure Active Directory authentication is enabled. Defaults to `true`. AadAuthEnabled pulumi.BoolPtrInput // The publicly accessible IP address of the Web PubSub Service. ExternalIp pulumi.StringPtrInput // The FQDN of the Web PubSub Service. Hostname pulumi.StringPtrInput // An `identity` block as defined below. Identity SocketioIdentityPtrInput // Whether the connectivity log category for live trace is enabled. Defaults to `true`. LiveTraceConnectivityLogsEnabled pulumi.BoolPtrInput // Whether the live trace tool is enabled. Defaults to `true`. LiveTraceEnabled pulumi.BoolPtrInput // Whether the HTTP request log category for live trace is enabled. Defaults to `true`. LiveTraceHttpRequestLogsEnabled pulumi.BoolPtrInput // Whether the messaging log category for live trace is enabled. Defaults to `true`. LiveTraceMessagingLogsEnabled pulumi.BoolPtrInput // Whether local authentication using an access key is enabled. Defaults to `true`. LocalAuthEnabled pulumi.BoolPtrInput // The Azure Region where the Web PubSub Service should exist. Changing this forces a new Web PubSub Service to be created. Location pulumi.StringPtrInput // The name which should be used for this Web PubSub Service. Changing this forces a new Web PubSub Service to be created. Name pulumi.StringPtrInput // The primary access key for the Web PubSub Service. PrimaryAccessKey pulumi.StringPtrInput // The primary connection string for the Web PubSub Service. PrimaryConnectionString pulumi.StringPtrInput // Whether public network access is enabled. Defaults to `Enabled`. Possible values are `Enabled` and `Disabled`. // // > **Note:** `publicNetworkAccess` cannot be set to `Disabled` when `sku` is `Free_F1`. PublicNetworkAccess pulumi.StringPtrInput // The publicly accessible port for client-side usage of the Web PubSub Service. PublicPort pulumi.IntPtrInput // The name of the Resource Group where the Web PubSub Service should exist. Changing this forces a new Web PubSub Service to be created. ResourceGroupName pulumi.StringPtrInput // The secondary access key for the Web PubSub Service. SecondaryAccessKey pulumi.StringPtrInput // The secondary connection string for the Web PubSub Service. SecondaryConnectionString pulumi.StringPtrInput // The publicly accessible port for server-side usage of the Web PubSub Service. ServerPort pulumi.IntPtrInput // The service mode of this Web PubSub Service. Defaults to `Default`. Possible values are `Default` and `Serverless`. ServiceMode pulumi.StringPtrInput // One or more `sku` blocks as defined below. Sku SocketioSkuPtrInput // A mapping of tags which should be assigned to the Web PubSub Service. Tags pulumi.StringMapInput // Whether the service should request a client certificate during a TLS handshake. Defaults to `false`. // // > **Note:** `tlsClientCertEnabled` cannot be set to `true` when `sku` is `Free_F1`. TlsClientCertEnabled pulumi.BoolPtrInput } func (SocketioState) ElementType() reflect.Type { return reflect.TypeOf((*socketioState)(nil)).Elem() } type socketioArgs struct { // Whether Azure Active Directory authentication is enabled. Defaults to `true`. AadAuthEnabled *bool `pulumi:"aadAuthEnabled"` // An `identity` block as defined below. Identity *SocketioIdentity `pulumi:"identity"` // Whether the connectivity log category for live trace is enabled. Defaults to `true`. LiveTraceConnectivityLogsEnabled *bool `pulumi:"liveTraceConnectivityLogsEnabled"` // Whether the live trace tool is enabled. Defaults to `true`. LiveTraceEnabled *bool `pulumi:"liveTraceEnabled"` // Whether the HTTP request log category for live trace is enabled. Defaults to `true`. LiveTraceHttpRequestLogsEnabled *bool `pulumi:"liveTraceHttpRequestLogsEnabled"` // Whether the messaging log category for live trace is enabled. Defaults to `true`. LiveTraceMessagingLogsEnabled *bool `pulumi:"liveTraceMessagingLogsEnabled"` // Whether local authentication using an access key is enabled. Defaults to `true`. LocalAuthEnabled *bool `pulumi:"localAuthEnabled"` // The Azure Region where the Web PubSub Service should exist. Changing this forces a new Web PubSub Service to be created. Location *string `pulumi:"location"` // The name which should be used for this Web PubSub Service. Changing this forces a new Web PubSub Service to be created. Name *string `pulumi:"name"` // Whether public network access is enabled. Defaults to `Enabled`. Possible values are `Enabled` and `Disabled`. // // > **Note:** `publicNetworkAccess` cannot be set to `Disabled` when `sku` is `Free_F1`. PublicNetworkAccess *string `pulumi:"publicNetworkAccess"` // The name of the Resource Group where the Web PubSub Service should exist. Changing this forces a new Web PubSub Service to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The service mode of this Web PubSub Service. Defaults to `Default`. Possible values are `Default` and `Serverless`. ServiceMode *string `pulumi:"serviceMode"` // One or more `sku` blocks as defined below. Sku SocketioSku `pulumi:"sku"` // A mapping of tags which should be assigned to the Web PubSub Service. Tags map[string]string `pulumi:"tags"` // Whether the service should request a client certificate during a TLS handshake. Defaults to `false`. // // > **Note:** `tlsClientCertEnabled` cannot be set to `true` when `sku` is `Free_F1`. TlsClientCertEnabled *bool `pulumi:"tlsClientCertEnabled"` } // The set of arguments for constructing a Socketio resource. type SocketioArgs struct { // Whether Azure Active Directory authentication is enabled. Defaults to `true`. AadAuthEnabled pulumi.BoolPtrInput // An `identity` block as defined below. Identity SocketioIdentityPtrInput // Whether the connectivity log category for live trace is enabled. Defaults to `true`. LiveTraceConnectivityLogsEnabled pulumi.BoolPtrInput // Whether the live trace tool is enabled. Defaults to `true`. LiveTraceEnabled pulumi.BoolPtrInput // Whether the HTTP request log category for live trace is enabled. Defaults to `true`. LiveTraceHttpRequestLogsEnabled pulumi.BoolPtrInput // Whether the messaging log category for live trace is enabled. Defaults to `true`. LiveTraceMessagingLogsEnabled pulumi.BoolPtrInput // Whether local authentication using an access key is enabled. Defaults to `true`. LocalAuthEnabled pulumi.BoolPtrInput // The Azure Region where the Web PubSub Service should exist. Changing this forces a new Web PubSub Service to be created. Location pulumi.StringPtrInput // The name which should be used for this Web PubSub Service. Changing this forces a new Web PubSub Service to be created. Name pulumi.StringPtrInput // Whether public network access is enabled. Defaults to `Enabled`. Possible values are `Enabled` and `Disabled`. // // > **Note:** `publicNetworkAccess` cannot be set to `Disabled` when `sku` is `Free_F1`. PublicNetworkAccess pulumi.StringPtrInput // The name of the Resource Group where the Web PubSub Service should exist. Changing this forces a new Web PubSub Service to be created. ResourceGroupName pulumi.StringInput // The service mode of this Web PubSub Service. Defaults to `Default`. Possible values are `Default` and `Serverless`. ServiceMode pulumi.StringPtrInput // One or more `sku` blocks as defined below. Sku SocketioSkuInput // A mapping of tags which should be assigned to the Web PubSub Service. Tags pulumi.StringMapInput // Whether the service should request a client certificate during a TLS handshake. Defaults to `false`. // // > **Note:** `tlsClientCertEnabled` cannot be set to `true` when `sku` is `Free_F1`. TlsClientCertEnabled pulumi.BoolPtrInput } func (SocketioArgs) ElementType() reflect.Type { return reflect.TypeOf((*socketioArgs)(nil)).Elem() } type SocketioInput interface { pulumi.Input ToSocketioOutput() SocketioOutput ToSocketioOutputWithContext(ctx context.Context) SocketioOutput } func (*Socketio) ElementType() reflect.Type { return reflect.TypeOf((**Socketio)(nil)).Elem() } func (i *Socketio) ToSocketioOutput() SocketioOutput { return i.ToSocketioOutputWithContext(context.Background()) } func (i *Socketio) ToSocketioOutputWithContext(ctx context.Context) SocketioOutput { return pulumi.ToOutputWithContext(ctx, i).(SocketioOutput) } // SocketioArrayInput is an input type that accepts SocketioArray and SocketioArrayOutput values. // You can construct a concrete instance of `SocketioArrayInput` via: // // SocketioArray{ SocketioArgs{...} } type SocketioArrayInput interface { pulumi.Input ToSocketioArrayOutput() SocketioArrayOutput ToSocketioArrayOutputWithContext(context.Context) SocketioArrayOutput } type SocketioArray []SocketioInput func (SocketioArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Socketio)(nil)).Elem() } func (i SocketioArray) ToSocketioArrayOutput() SocketioArrayOutput { return i.ToSocketioArrayOutputWithContext(context.Background()) } func (i SocketioArray) ToSocketioArrayOutputWithContext(ctx context.Context) SocketioArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SocketioArrayOutput) } // SocketioMapInput is an input type that accepts SocketioMap and SocketioMapOutput values. // You can construct a concrete instance of `SocketioMapInput` via: // // SocketioMap{ "key": SocketioArgs{...} } type SocketioMapInput interface { pulumi.Input ToSocketioMapOutput() SocketioMapOutput ToSocketioMapOutputWithContext(context.Context) SocketioMapOutput } type SocketioMap map[string]SocketioInput func (SocketioMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Socketio)(nil)).Elem() } func (i SocketioMap) ToSocketioMapOutput() SocketioMapOutput { return i.ToSocketioMapOutputWithContext(context.Background()) } func (i SocketioMap) ToSocketioMapOutputWithContext(ctx context.Context) SocketioMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SocketioMapOutput) } type SocketioOutput struct{ *pulumi.OutputState } func (SocketioOutput) ElementType() reflect.Type { return reflect.TypeOf((**Socketio)(nil)).Elem() } func (o SocketioOutput) ToSocketioOutput() SocketioOutput { return o } func (o SocketioOutput) ToSocketioOutputWithContext(ctx context.Context) SocketioOutput { return o } // Whether Azure Active Directory authentication is enabled. Defaults to `true`. func (o SocketioOutput) AadAuthEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Socketio) pulumi.BoolPtrOutput { return v.AadAuthEnabled }).(pulumi.BoolPtrOutput) } // The publicly accessible IP address of the Web PubSub Service. func (o SocketioOutput) ExternalIp() pulumi.StringOutput { return o.ApplyT(func(v *Socketio) pulumi.StringOutput { return v.ExternalIp }).(pulumi.StringOutput) } // The FQDN of the Web PubSub Service. func (o SocketioOutput) Hostname() pulumi.StringOutput { return o.ApplyT(func(v *Socketio) pulumi.StringOutput { return v.Hostname }).(pulumi.StringOutput) } // An `identity` block as defined below. func (o SocketioOutput) Identity() SocketioIdentityPtrOutput { return o.ApplyT(func(v *Socketio) SocketioIdentityPtrOutput { return v.Identity }).(SocketioIdentityPtrOutput) } // Whether the connectivity log category for live trace is enabled. Defaults to `true`. func (o SocketioOutput) LiveTraceConnectivityLogsEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Socketio) pulumi.BoolPtrOutput { return v.LiveTraceConnectivityLogsEnabled }).(pulumi.BoolPtrOutput) } // Whether the live trace tool is enabled. Defaults to `true`. func (o SocketioOutput) LiveTraceEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Socketio) pulumi.BoolPtrOutput { return v.LiveTraceEnabled }).(pulumi.BoolPtrOutput) } // Whether the HTTP request log category for live trace is enabled. Defaults to `true`. func (o SocketioOutput) LiveTraceHttpRequestLogsEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Socketio) pulumi.BoolPtrOutput { return v.LiveTraceHttpRequestLogsEnabled }).(pulumi.BoolPtrOutput) } // Whether the messaging log category for live trace is enabled. Defaults to `true`. func (o SocketioOutput) LiveTraceMessagingLogsEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Socketio) pulumi.BoolPtrOutput { return v.LiveTraceMessagingLogsEnabled }).(pulumi.BoolPtrOutput) } // Whether local authentication using an access key is enabled. Defaults to `true`. func (o SocketioOutput) LocalAuthEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Socketio) pulumi.BoolPtrOutput { return v.LocalAuthEnabled }).(pulumi.BoolPtrOutput) } // The Azure Region where the Web PubSub Service should exist. Changing this forces a new Web PubSub Service to be created. func (o SocketioOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Socketio) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Web PubSub Service. Changing this forces a new Web PubSub Service to be created. func (o SocketioOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Socketio) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The primary access key for the Web PubSub Service. func (o SocketioOutput) PrimaryAccessKey() pulumi.StringOutput { return o.ApplyT(func(v *Socketio) pulumi.StringOutput { return v.PrimaryAccessKey }).(pulumi.StringOutput) } // The primary connection string for the Web PubSub Service. func (o SocketioOutput) PrimaryConnectionString() pulumi.StringOutput { return o.ApplyT(func(v *Socketio) pulumi.StringOutput { return v.PrimaryConnectionString }).(pulumi.StringOutput) } // Whether public network access is enabled. Defaults to `Enabled`. Possible values are `Enabled` and `Disabled`. // // > **Note:** `publicNetworkAccess` cannot be set to `Disabled` when `sku` is `Free_F1`. func (o SocketioOutput) PublicNetworkAccess() pulumi.StringPtrOutput { return o.ApplyT(func(v *Socketio) pulumi.StringPtrOutput { return v.PublicNetworkAccess }).(pulumi.StringPtrOutput) } // The publicly accessible port for client-side usage of the Web PubSub Service. func (o SocketioOutput) PublicPort() pulumi.IntOutput { return o.ApplyT(func(v *Socketio) pulumi.IntOutput { return v.PublicPort }).(pulumi.IntOutput) } // The name of the Resource Group where the Web PubSub Service should exist. Changing this forces a new Web PubSub Service to be created. func (o SocketioOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Socketio) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The secondary access key for the Web PubSub Service. func (o SocketioOutput) SecondaryAccessKey() pulumi.StringOutput { return o.ApplyT(func(v *Socketio) pulumi.StringOutput { return v.SecondaryAccessKey }).(pulumi.StringOutput) } // The secondary connection string for the Web PubSub Service. func (o SocketioOutput) SecondaryConnectionString() pulumi.StringOutput { return o.ApplyT(func(v *Socketio) pulumi.StringOutput { return v.SecondaryConnectionString }).(pulumi.StringOutput) } // The publicly accessible port for server-side usage of the Web PubSub Service. func (o SocketioOutput) ServerPort() pulumi.IntOutput { return o.ApplyT(func(v *Socketio) pulumi.IntOutput { return v.ServerPort }).(pulumi.IntOutput) } // The service mode of this Web PubSub Service. Defaults to `Default`. Possible values are `Default` and `Serverless`. func (o SocketioOutput) ServiceMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *Socketio) pulumi.StringPtrOutput { return v.ServiceMode }).(pulumi.StringPtrOutput) } // One or more `sku` blocks as defined below. func (o SocketioOutput) Sku() SocketioSkuOutput { return o.ApplyT(func(v *Socketio) SocketioSkuOutput { return v.Sku }).(SocketioSkuOutput) } // A mapping of tags which should be assigned to the Web PubSub Service. func (o SocketioOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Socketio) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Whether the service should request a client certificate during a TLS handshake. Defaults to `false`. // // > **Note:** `tlsClientCertEnabled` cannot be set to `true` when `sku` is `Free_F1`. func (o SocketioOutput) TlsClientCertEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Socketio) pulumi.BoolPtrOutput { return v.TlsClientCertEnabled }).(pulumi.BoolPtrOutput) } type SocketioArrayOutput struct{ *pulumi.OutputState } func (SocketioArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Socketio)(nil)).Elem() } func (o SocketioArrayOutput) ToSocketioArrayOutput() SocketioArrayOutput { return o } func (o SocketioArrayOutput) ToSocketioArrayOutputWithContext(ctx context.Context) SocketioArrayOutput { return o } func (o SocketioArrayOutput) Index(i pulumi.IntInput) SocketioOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Socketio { return vs[0].([]*Socketio)[vs[1].(int)] }).(SocketioOutput) } type SocketioMapOutput struct{ *pulumi.OutputState } func (SocketioMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Socketio)(nil)).Elem() } func (o SocketioMapOutput) ToSocketioMapOutput() SocketioMapOutput { return o } func (o SocketioMapOutput) ToSocketioMapOutputWithContext(ctx context.Context) SocketioMapOutput { return o } func (o SocketioMapOutput) MapIndex(k pulumi.StringInput) SocketioOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Socketio { return vs[0].(map[string]*Socketio)[vs[1].(string)] }).(SocketioOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SocketioInput)(nil)).Elem(), &Socketio{}) pulumi.RegisterInputType(reflect.TypeOf((*SocketioArrayInput)(nil)).Elem(), SocketioArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SocketioMapInput)(nil)).Elem(), SocketioMap{}) pulumi.RegisterOutputType(SocketioOutput{}) pulumi.RegisterOutputType(SocketioArrayOutput{}) pulumi.RegisterOutputType(SocketioMapOutput{}) }
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/webpubsub/service.go
sdk/go/azure/webpubsub/service.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 webpubsub 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 Web PubSub Service. // // ## 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/webpubsub" // "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("terraform-webpubsub"), // Location: pulumi.String("east us"), // }) // if err != nil { // return err // } // _, err = webpubsub.NewService(ctx, "example", &webpubsub.ServiceArgs{ // Name: pulumi.String("tfex-webpubsub"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("Standard_S1"), // Capacity: pulumi.Int(1), // PublicNetworkAccessEnabled: pulumi.Bool(false), // LiveTrace: &webpubsub.ServiceLiveTraceArgs{ // Enabled: pulumi.Bool(true), // MessagingLogsEnabled: pulumi.Bool(true), // ConnectivityLogsEnabled: pulumi.Bool(false), // }, // Identity: &webpubsub.ServiceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // 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.SignalRService` - 2024-03-01 // // ## Import // // Web PubSub services can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:webpubsub/service:Service example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SignalRService/webPubSub/pubsub1 // ``` type Service struct { pulumi.CustomResourceState // Whether to enable AAD auth? Defaults to `true`. AadAuthEnabled pulumi.BoolPtrOutput `pulumi:"aadAuthEnabled"` // Specifies the number of units associated with this Web PubSub resource. Valid values are `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `20`, `30`, `40`, `50`, `60`, `70`, `80`, `90`, `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900` and `1000`. // // > **Note:** The valid capacity range for sku `Free_F1` is `1`, for sku `Premium_P2` is from `100` to `1000`, and from `1` to `100` for sku `Standard_S1` and `Premium_P1`. Capacity pulumi.IntPtrOutput `pulumi:"capacity"` // The publicly accessible IP of the Web PubSub service. ExternalIp pulumi.StringOutput `pulumi:"externalIp"` // The FQDN of the Web PubSub service. Hostname pulumi.StringOutput `pulumi:"hostname"` // An `identity` block as defined below. Identity ServiceIdentityPtrOutput `pulumi:"identity"` // A `liveTrace` block as defined below. LiveTrace ServiceLiveTracePtrOutput `pulumi:"liveTrace"` // Whether to enable local auth? Defaults to `true`. LocalAuthEnabled pulumi.BoolPtrOutput `pulumi:"localAuthEnabled"` // Specifies the supported Azure location where the Web PubSub service exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the Web PubSub service. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The primary access key for the Web PubSub service. PrimaryAccessKey pulumi.StringOutput `pulumi:"primaryAccessKey"` // The primary connection string for the Web PubSub service. PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"` // Whether to enable public network access? Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"` // The publicly accessible port of the Web PubSub service which is designed for browser/client use. PublicPort pulumi.IntOutput `pulumi:"publicPort"` // The name of the resource group in which to create the Web PubSub service. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The secondary access key for the Web PubSub service. SecondaryAccessKey pulumi.StringOutput `pulumi:"secondaryAccessKey"` // The secondary connection string for the Web PubSub service. SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"` // The publicly accessible port of the Web PubSub service which is designed for customer server side use. ServerPort pulumi.IntOutput `pulumi:"serverPort"` // Specifies which SKU to use. Possible values are `Free_F1`, `Standard_S1`, `Premium_P1` and `Premium_P2`. Sku pulumi.StringOutput `pulumi:"sku"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // Whether to request client certificate during TLS handshake? Defaults to `false`. TlsClientCertEnabled pulumi.BoolPtrOutput `pulumi:"tlsClientCertEnabled"` Version pulumi.StringOutput `pulumi:"version"` } // NewService registers a new resource with the given unique name, arguments, and options. func NewService(ctx *pulumi.Context, name string, args *ServiceArgs, opts ...pulumi.ResourceOption) (*Service, 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'") } secrets := pulumi.AdditionalSecretOutputs([]string{ "primaryAccessKey", "primaryConnectionString", "secondaryAccessKey", "secondaryConnectionString", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource Service err := ctx.RegisterResource("azure:webpubsub/service:Service", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetService gets an existing Service 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 GetService(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ServiceState, opts ...pulumi.ResourceOption) (*Service, error) { var resource Service err := ctx.ReadResource("azure:webpubsub/service:Service", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Service resources. type serviceState struct { // Whether to enable AAD auth? Defaults to `true`. AadAuthEnabled *bool `pulumi:"aadAuthEnabled"` // Specifies the number of units associated with this Web PubSub resource. Valid values are `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `20`, `30`, `40`, `50`, `60`, `70`, `80`, `90`, `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900` and `1000`. // // > **Note:** The valid capacity range for sku `Free_F1` is `1`, for sku `Premium_P2` is from `100` to `1000`, and from `1` to `100` for sku `Standard_S1` and `Premium_P1`. Capacity *int `pulumi:"capacity"` // The publicly accessible IP of the Web PubSub service. ExternalIp *string `pulumi:"externalIp"` // The FQDN of the Web PubSub service. Hostname *string `pulumi:"hostname"` // An `identity` block as defined below. Identity *ServiceIdentity `pulumi:"identity"` // A `liveTrace` block as defined below. LiveTrace *ServiceLiveTrace `pulumi:"liveTrace"` // Whether to enable local auth? Defaults to `true`. LocalAuthEnabled *bool `pulumi:"localAuthEnabled"` // Specifies the supported Azure location where the Web PubSub service exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Web PubSub service. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The primary access key for the Web PubSub service. PrimaryAccessKey *string `pulumi:"primaryAccessKey"` // The primary connection string for the Web PubSub service. PrimaryConnectionString *string `pulumi:"primaryConnectionString"` // Whether to enable public network access? Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // The publicly accessible port of the Web PubSub service which is designed for browser/client use. PublicPort *int `pulumi:"publicPort"` // The name of the resource group in which to create the Web PubSub service. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The secondary access key for the Web PubSub service. SecondaryAccessKey *string `pulumi:"secondaryAccessKey"` // The secondary connection string for the Web PubSub service. SecondaryConnectionString *string `pulumi:"secondaryConnectionString"` // The publicly accessible port of the Web PubSub service which is designed for customer server side use. ServerPort *int `pulumi:"serverPort"` // Specifies which SKU to use. Possible values are `Free_F1`, `Standard_S1`, `Premium_P1` and `Premium_P2`. Sku *string `pulumi:"sku"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Whether to request client certificate during TLS handshake? Defaults to `false`. TlsClientCertEnabled *bool `pulumi:"tlsClientCertEnabled"` Version *string `pulumi:"version"` } type ServiceState struct { // Whether to enable AAD auth? Defaults to `true`. AadAuthEnabled pulumi.BoolPtrInput // Specifies the number of units associated with this Web PubSub resource. Valid values are `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `20`, `30`, `40`, `50`, `60`, `70`, `80`, `90`, `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900` and `1000`. // // > **Note:** The valid capacity range for sku `Free_F1` is `1`, for sku `Premium_P2` is from `100` to `1000`, and from `1` to `100` for sku `Standard_S1` and `Premium_P1`. Capacity pulumi.IntPtrInput // The publicly accessible IP of the Web PubSub service. ExternalIp pulumi.StringPtrInput // The FQDN of the Web PubSub service. Hostname pulumi.StringPtrInput // An `identity` block as defined below. Identity ServiceIdentityPtrInput // A `liveTrace` block as defined below. LiveTrace ServiceLiveTracePtrInput // Whether to enable local auth? Defaults to `true`. LocalAuthEnabled pulumi.BoolPtrInput // Specifies the supported Azure location where the Web PubSub service exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Web PubSub service. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The primary access key for the Web PubSub service. PrimaryAccessKey pulumi.StringPtrInput // The primary connection string for the Web PubSub service. PrimaryConnectionString pulumi.StringPtrInput // Whether to enable public network access? Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // The publicly accessible port of the Web PubSub service which is designed for browser/client use. PublicPort pulumi.IntPtrInput // The name of the resource group in which to create the Web PubSub service. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The secondary access key for the Web PubSub service. SecondaryAccessKey pulumi.StringPtrInput // The secondary connection string for the Web PubSub service. SecondaryConnectionString pulumi.StringPtrInput // The publicly accessible port of the Web PubSub service which is designed for customer server side use. ServerPort pulumi.IntPtrInput // Specifies which SKU to use. Possible values are `Free_F1`, `Standard_S1`, `Premium_P1` and `Premium_P2`. Sku pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Whether to request client certificate during TLS handshake? Defaults to `false`. TlsClientCertEnabled pulumi.BoolPtrInput Version pulumi.StringPtrInput } func (ServiceState) ElementType() reflect.Type { return reflect.TypeOf((*serviceState)(nil)).Elem() } type serviceArgs struct { // Whether to enable AAD auth? Defaults to `true`. AadAuthEnabled *bool `pulumi:"aadAuthEnabled"` // Specifies the number of units associated with this Web PubSub resource. Valid values are `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `20`, `30`, `40`, `50`, `60`, `70`, `80`, `90`, `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900` and `1000`. // // > **Note:** The valid capacity range for sku `Free_F1` is `1`, for sku `Premium_P2` is from `100` to `1000`, and from `1` to `100` for sku `Standard_S1` and `Premium_P1`. Capacity *int `pulumi:"capacity"` // An `identity` block as defined below. Identity *ServiceIdentity `pulumi:"identity"` // A `liveTrace` block as defined below. LiveTrace *ServiceLiveTrace `pulumi:"liveTrace"` // Whether to enable local auth? Defaults to `true`. LocalAuthEnabled *bool `pulumi:"localAuthEnabled"` // Specifies the supported Azure location where the Web PubSub service exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Web PubSub service. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Whether to enable public network access? Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // The name of the resource group in which to create the Web PubSub service. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies which SKU to use. Possible values are `Free_F1`, `Standard_S1`, `Premium_P1` and `Premium_P2`. Sku string `pulumi:"sku"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Whether to request client certificate during TLS handshake? Defaults to `false`. TlsClientCertEnabled *bool `pulumi:"tlsClientCertEnabled"` } // The set of arguments for constructing a Service resource. type ServiceArgs struct { // Whether to enable AAD auth? Defaults to `true`. AadAuthEnabled pulumi.BoolPtrInput // Specifies the number of units associated with this Web PubSub resource. Valid values are `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `20`, `30`, `40`, `50`, `60`, `70`, `80`, `90`, `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900` and `1000`. // // > **Note:** The valid capacity range for sku `Free_F1` is `1`, for sku `Premium_P2` is from `100` to `1000`, and from `1` to `100` for sku `Standard_S1` and `Premium_P1`. Capacity pulumi.IntPtrInput // An `identity` block as defined below. Identity ServiceIdentityPtrInput // A `liveTrace` block as defined below. LiveTrace ServiceLiveTracePtrInput // Whether to enable local auth? Defaults to `true`. LocalAuthEnabled pulumi.BoolPtrInput // Specifies the supported Azure location where the Web PubSub service exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Web PubSub service. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Whether to enable public network access? Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // The name of the resource group in which to create the Web PubSub service. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Specifies which SKU to use. Possible values are `Free_F1`, `Standard_S1`, `Premium_P1` and `Premium_P2`. Sku pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Whether to request client certificate during TLS handshake? Defaults to `false`. TlsClientCertEnabled pulumi.BoolPtrInput } func (ServiceArgs) ElementType() reflect.Type { return reflect.TypeOf((*serviceArgs)(nil)).Elem() } type ServiceInput interface { pulumi.Input ToServiceOutput() ServiceOutput ToServiceOutputWithContext(ctx context.Context) ServiceOutput } func (*Service) ElementType() reflect.Type { return reflect.TypeOf((**Service)(nil)).Elem() } func (i *Service) ToServiceOutput() ServiceOutput { return i.ToServiceOutputWithContext(context.Background()) } func (i *Service) ToServiceOutputWithContext(ctx context.Context) ServiceOutput { return pulumi.ToOutputWithContext(ctx, i).(ServiceOutput) } // ServiceArrayInput is an input type that accepts ServiceArray and ServiceArrayOutput values. // You can construct a concrete instance of `ServiceArrayInput` via: // // ServiceArray{ ServiceArgs{...} } type ServiceArrayInput interface { pulumi.Input ToServiceArrayOutput() ServiceArrayOutput ToServiceArrayOutputWithContext(context.Context) ServiceArrayOutput } type ServiceArray []ServiceInput func (ServiceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Service)(nil)).Elem() } func (i ServiceArray) ToServiceArrayOutput() ServiceArrayOutput { return i.ToServiceArrayOutputWithContext(context.Background()) } func (i ServiceArray) ToServiceArrayOutputWithContext(ctx context.Context) ServiceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ServiceArrayOutput) } // ServiceMapInput is an input type that accepts ServiceMap and ServiceMapOutput values. // You can construct a concrete instance of `ServiceMapInput` via: // // ServiceMap{ "key": ServiceArgs{...} } type ServiceMapInput interface { pulumi.Input ToServiceMapOutput() ServiceMapOutput ToServiceMapOutputWithContext(context.Context) ServiceMapOutput } type ServiceMap map[string]ServiceInput func (ServiceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Service)(nil)).Elem() } func (i ServiceMap) ToServiceMapOutput() ServiceMapOutput { return i.ToServiceMapOutputWithContext(context.Background()) } func (i ServiceMap) ToServiceMapOutputWithContext(ctx context.Context) ServiceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ServiceMapOutput) } type ServiceOutput struct{ *pulumi.OutputState } func (ServiceOutput) ElementType() reflect.Type { return reflect.TypeOf((**Service)(nil)).Elem() } func (o ServiceOutput) ToServiceOutput() ServiceOutput { return o } func (o ServiceOutput) ToServiceOutputWithContext(ctx context.Context) ServiceOutput { return o } // Whether to enable AAD auth? Defaults to `true`. func (o ServiceOutput) AadAuthEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Service) pulumi.BoolPtrOutput { return v.AadAuthEnabled }).(pulumi.BoolPtrOutput) } // Specifies the number of units associated with this Web PubSub resource. Valid values are `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `20`, `30`, `40`, `50`, `60`, `70`, `80`, `90`, `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900` and `1000`. // // > **Note:** The valid capacity range for sku `Free_F1` is `1`, for sku `Premium_P2` is from `100` to `1000`, and from `1` to `100` for sku `Standard_S1` and `Premium_P1`. func (o ServiceOutput) Capacity() pulumi.IntPtrOutput { return o.ApplyT(func(v *Service) pulumi.IntPtrOutput { return v.Capacity }).(pulumi.IntPtrOutput) } // The publicly accessible IP of the Web PubSub service. func (o ServiceOutput) ExternalIp() pulumi.StringOutput { return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.ExternalIp }).(pulumi.StringOutput) } // The FQDN of the Web PubSub service. func (o ServiceOutput) Hostname() pulumi.StringOutput { return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.Hostname }).(pulumi.StringOutput) } // An `identity` block as defined below. func (o ServiceOutput) Identity() ServiceIdentityPtrOutput { return o.ApplyT(func(v *Service) ServiceIdentityPtrOutput { return v.Identity }).(ServiceIdentityPtrOutput) } // A `liveTrace` block as defined below. func (o ServiceOutput) LiveTrace() ServiceLiveTracePtrOutput { return o.ApplyT(func(v *Service) ServiceLiveTracePtrOutput { return v.LiveTrace }).(ServiceLiveTracePtrOutput) } // Whether to enable local auth? Defaults to `true`. func (o ServiceOutput) LocalAuthEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Service) pulumi.BoolPtrOutput { return v.LocalAuthEnabled }).(pulumi.BoolPtrOutput) } // Specifies the supported Azure location where the Web PubSub service exists. Changing this forces a new resource to be created. func (o ServiceOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the Web PubSub service. Changing this forces a new resource to be created. func (o ServiceOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The primary access key for the Web PubSub service. func (o ServiceOutput) PrimaryAccessKey() pulumi.StringOutput { return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.PrimaryAccessKey }).(pulumi.StringOutput) } // The primary connection string for the Web PubSub service. func (o ServiceOutput) PrimaryConnectionString() pulumi.StringOutput { return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.PrimaryConnectionString }).(pulumi.StringOutput) } // Whether to enable public network access? Defaults to `true`. func (o ServiceOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Service) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput) } // The publicly accessible port of the Web PubSub service which is designed for browser/client use. func (o ServiceOutput) PublicPort() pulumi.IntOutput { return o.ApplyT(func(v *Service) pulumi.IntOutput { return v.PublicPort }).(pulumi.IntOutput) } // The name of the resource group in which to create the Web PubSub service. Changing this forces a new resource to be created. func (o ServiceOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The secondary access key for the Web PubSub service. func (o ServiceOutput) SecondaryAccessKey() pulumi.StringOutput { return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.SecondaryAccessKey }).(pulumi.StringOutput) } // The secondary connection string for the Web PubSub service. func (o ServiceOutput) SecondaryConnectionString() pulumi.StringOutput { return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.SecondaryConnectionString }).(pulumi.StringOutput) } // The publicly accessible port of the Web PubSub service which is designed for customer server side use. func (o ServiceOutput) ServerPort() pulumi.IntOutput { return o.ApplyT(func(v *Service) pulumi.IntOutput { return v.ServerPort }).(pulumi.IntOutput) } // Specifies which SKU to use. Possible values are `Free_F1`, `Standard_S1`, `Premium_P1` and `Premium_P2`. func (o ServiceOutput) Sku() pulumi.StringOutput { return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.Sku }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o ServiceOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Service) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Whether to request client certificate during TLS handshake? Defaults to `false`. func (o ServiceOutput) TlsClientCertEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Service) pulumi.BoolPtrOutput { return v.TlsClientCertEnabled }).(pulumi.BoolPtrOutput) } func (o ServiceOutput) Version() pulumi.StringOutput { return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.Version }).(pulumi.StringOutput) } type ServiceArrayOutput struct{ *pulumi.OutputState } func (ServiceArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Service)(nil)).Elem() } func (o ServiceArrayOutput) ToServiceArrayOutput() ServiceArrayOutput { return o } func (o ServiceArrayOutput) ToServiceArrayOutputWithContext(ctx context.Context) ServiceArrayOutput { return o } func (o ServiceArrayOutput) Index(i pulumi.IntInput) ServiceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Service { return vs[0].([]*Service)[vs[1].(int)] }).(ServiceOutput) } type ServiceMapOutput struct{ *pulumi.OutputState } func (ServiceMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Service)(nil)).Elem() } func (o ServiceMapOutput) ToServiceMapOutput() ServiceMapOutput { return o } func (o ServiceMapOutput) ToServiceMapOutputWithContext(ctx context.Context) ServiceMapOutput { return o } func (o ServiceMapOutput) MapIndex(k pulumi.StringInput) ServiceOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Service { return vs[0].(map[string]*Service)[vs[1].(string)] }).(ServiceOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ServiceInput)(nil)).Elem(), &Service{}) pulumi.RegisterInputType(reflect.TypeOf((*ServiceArrayInput)(nil)).Elem(), ServiceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ServiceMapInput)(nil)).Elem(), ServiceMap{}) pulumi.RegisterOutputType(ServiceOutput{}) pulumi.RegisterOutputType(ServiceArrayOutput{}) pulumi.RegisterOutputType(ServiceMapOutput{}) }
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/webpubsub/customDomain.go
sdk/go/azure/webpubsub/customDomain.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 webpubsub 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 Web PubSub Custom Domain. // // ## Example Usage // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.SignalRService` - 2024-03-01 // // ## Import // // Custom Domain for a Web PubSub service can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:webpubsub/customDomain:CustomDomain example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SignalRService/webPubSub/webpubsub1/customDomains/customDomain1 // ``` type CustomDomain struct { pulumi.CustomResourceState // Specifies the custom domain name of the Web PubSub Custom Domain. Changing this forces a new resource to be created. // // > **Note:** Please ensure the custom domain name is included in the Subject Alternative Names of the selected Web PubSub Custom Certificate. DomainName pulumi.StringOutput `pulumi:"domainName"` // Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created. WebPubsubCustomCertificateId pulumi.StringOutput `pulumi:"webPubsubCustomCertificateId"` // Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created. WebPubsubId pulumi.StringOutput `pulumi:"webPubsubId"` } // NewCustomDomain registers a new resource with the given unique name, arguments, and options. func NewCustomDomain(ctx *pulumi.Context, name string, args *CustomDomainArgs, opts ...pulumi.ResourceOption) (*CustomDomain, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DomainName == nil { return nil, errors.New("invalid value for required argument 'DomainName'") } if args.WebPubsubCustomCertificateId == nil { return nil, errors.New("invalid value for required argument 'WebPubsubCustomCertificateId'") } if args.WebPubsubId == nil { return nil, errors.New("invalid value for required argument 'WebPubsubId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource CustomDomain err := ctx.RegisterResource("azure:webpubsub/customDomain:CustomDomain", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetCustomDomain gets an existing CustomDomain 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 GetCustomDomain(ctx *pulumi.Context, name string, id pulumi.IDInput, state *CustomDomainState, opts ...pulumi.ResourceOption) (*CustomDomain, error) { var resource CustomDomain err := ctx.ReadResource("azure:webpubsub/customDomain:CustomDomain", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering CustomDomain resources. type customDomainState struct { // Specifies the custom domain name of the Web PubSub Custom Domain. Changing this forces a new resource to be created. // // > **Note:** Please ensure the custom domain name is included in the Subject Alternative Names of the selected Web PubSub Custom Certificate. DomainName *string `pulumi:"domainName"` // Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created. WebPubsubCustomCertificateId *string `pulumi:"webPubsubCustomCertificateId"` // Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created. WebPubsubId *string `pulumi:"webPubsubId"` } type CustomDomainState struct { // Specifies the custom domain name of the Web PubSub Custom Domain. Changing this forces a new resource to be created. // // > **Note:** Please ensure the custom domain name is included in the Subject Alternative Names of the selected Web PubSub Custom Certificate. DomainName pulumi.StringPtrInput // Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created. WebPubsubCustomCertificateId pulumi.StringPtrInput // Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created. WebPubsubId pulumi.StringPtrInput } func (CustomDomainState) ElementType() reflect.Type { return reflect.TypeOf((*customDomainState)(nil)).Elem() } type customDomainArgs struct { // Specifies the custom domain name of the Web PubSub Custom Domain. Changing this forces a new resource to be created. // // > **Note:** Please ensure the custom domain name is included in the Subject Alternative Names of the selected Web PubSub Custom Certificate. DomainName string `pulumi:"domainName"` // Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created. WebPubsubCustomCertificateId string `pulumi:"webPubsubCustomCertificateId"` // Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created. WebPubsubId string `pulumi:"webPubsubId"` } // The set of arguments for constructing a CustomDomain resource. type CustomDomainArgs struct { // Specifies the custom domain name of the Web PubSub Custom Domain. Changing this forces a new resource to be created. // // > **Note:** Please ensure the custom domain name is included in the Subject Alternative Names of the selected Web PubSub Custom Certificate. DomainName pulumi.StringInput // Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created. WebPubsubCustomCertificateId pulumi.StringInput // Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created. WebPubsubId pulumi.StringInput } func (CustomDomainArgs) ElementType() reflect.Type { return reflect.TypeOf((*customDomainArgs)(nil)).Elem() } type CustomDomainInput interface { pulumi.Input ToCustomDomainOutput() CustomDomainOutput ToCustomDomainOutputWithContext(ctx context.Context) CustomDomainOutput } func (*CustomDomain) ElementType() reflect.Type { return reflect.TypeOf((**CustomDomain)(nil)).Elem() } func (i *CustomDomain) ToCustomDomainOutput() CustomDomainOutput { return i.ToCustomDomainOutputWithContext(context.Background()) } func (i *CustomDomain) ToCustomDomainOutputWithContext(ctx context.Context) CustomDomainOutput { return pulumi.ToOutputWithContext(ctx, i).(CustomDomainOutput) } // CustomDomainArrayInput is an input type that accepts CustomDomainArray and CustomDomainArrayOutput values. // You can construct a concrete instance of `CustomDomainArrayInput` via: // // CustomDomainArray{ CustomDomainArgs{...} } type CustomDomainArrayInput interface { pulumi.Input ToCustomDomainArrayOutput() CustomDomainArrayOutput ToCustomDomainArrayOutputWithContext(context.Context) CustomDomainArrayOutput } type CustomDomainArray []CustomDomainInput func (CustomDomainArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*CustomDomain)(nil)).Elem() } func (i CustomDomainArray) ToCustomDomainArrayOutput() CustomDomainArrayOutput { return i.ToCustomDomainArrayOutputWithContext(context.Background()) } func (i CustomDomainArray) ToCustomDomainArrayOutputWithContext(ctx context.Context) CustomDomainArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CustomDomainArrayOutput) } // CustomDomainMapInput is an input type that accepts CustomDomainMap and CustomDomainMapOutput values. // You can construct a concrete instance of `CustomDomainMapInput` via: // // CustomDomainMap{ "key": CustomDomainArgs{...} } type CustomDomainMapInput interface { pulumi.Input ToCustomDomainMapOutput() CustomDomainMapOutput ToCustomDomainMapOutputWithContext(context.Context) CustomDomainMapOutput } type CustomDomainMap map[string]CustomDomainInput func (CustomDomainMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CustomDomain)(nil)).Elem() } func (i CustomDomainMap) ToCustomDomainMapOutput() CustomDomainMapOutput { return i.ToCustomDomainMapOutputWithContext(context.Background()) } func (i CustomDomainMap) ToCustomDomainMapOutputWithContext(ctx context.Context) CustomDomainMapOutput { return pulumi.ToOutputWithContext(ctx, i).(CustomDomainMapOutput) } type CustomDomainOutput struct{ *pulumi.OutputState } func (CustomDomainOutput) ElementType() reflect.Type { return reflect.TypeOf((**CustomDomain)(nil)).Elem() } func (o CustomDomainOutput) ToCustomDomainOutput() CustomDomainOutput { return o } func (o CustomDomainOutput) ToCustomDomainOutputWithContext(ctx context.Context) CustomDomainOutput { return o } // Specifies the custom domain name of the Web PubSub Custom Domain. Changing this forces a new resource to be created. // // > **Note:** Please ensure the custom domain name is included in the Subject Alternative Names of the selected Web PubSub Custom Certificate. func (o CustomDomainOutput) DomainName() pulumi.StringOutput { return o.ApplyT(func(v *CustomDomain) pulumi.StringOutput { return v.DomainName }).(pulumi.StringOutput) } // Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created. func (o CustomDomainOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *CustomDomain) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created. func (o CustomDomainOutput) WebPubsubCustomCertificateId() pulumi.StringOutput { return o.ApplyT(func(v *CustomDomain) pulumi.StringOutput { return v.WebPubsubCustomCertificateId }).(pulumi.StringOutput) } // Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created. func (o CustomDomainOutput) WebPubsubId() pulumi.StringOutput { return o.ApplyT(func(v *CustomDomain) pulumi.StringOutput { return v.WebPubsubId }).(pulumi.StringOutput) } type CustomDomainArrayOutput struct{ *pulumi.OutputState } func (CustomDomainArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*CustomDomain)(nil)).Elem() } func (o CustomDomainArrayOutput) ToCustomDomainArrayOutput() CustomDomainArrayOutput { return o } func (o CustomDomainArrayOutput) ToCustomDomainArrayOutputWithContext(ctx context.Context) CustomDomainArrayOutput { return o } func (o CustomDomainArrayOutput) Index(i pulumi.IntInput) CustomDomainOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CustomDomain { return vs[0].([]*CustomDomain)[vs[1].(int)] }).(CustomDomainOutput) } type CustomDomainMapOutput struct{ *pulumi.OutputState } func (CustomDomainMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CustomDomain)(nil)).Elem() } func (o CustomDomainMapOutput) ToCustomDomainMapOutput() CustomDomainMapOutput { return o } func (o CustomDomainMapOutput) ToCustomDomainMapOutputWithContext(ctx context.Context) CustomDomainMapOutput { return o } func (o CustomDomainMapOutput) MapIndex(k pulumi.StringInput) CustomDomainOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CustomDomain { return vs[0].(map[string]*CustomDomain)[vs[1].(string)] }).(CustomDomainOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*CustomDomainInput)(nil)).Elem(), &CustomDomain{}) pulumi.RegisterInputType(reflect.TypeOf((*CustomDomainArrayInput)(nil)).Elem(), CustomDomainArray{}) pulumi.RegisterInputType(reflect.TypeOf((*CustomDomainMapInput)(nil)).Elem(), CustomDomainMap{}) pulumi.RegisterOutputType(CustomDomainOutput{}) pulumi.RegisterOutputType(CustomDomainArrayOutput{}) pulumi.RegisterOutputType(CustomDomainMapOutput{}) }
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/webpubsub/networkAcl.go
sdk/go/azure/webpubsub/networkAcl.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 webpubsub import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages the Network ACL for a Web Pubsub. // // ## 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/privatelink" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/webpubsub" // "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("terraform-webpubsub"), // Location: pulumi.String("east us"), // }) // if err != nil { // return err // } // exampleService, err := webpubsub.NewService(ctx, "example", &webpubsub.ServiceArgs{ // Name: pulumi.String("tfex-webpubsub"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("Standard_S1"), // Capacity: pulumi.Int(1), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vnet"), // ResourceGroupName: example.Name, // Location: example.Location, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.5.0.0/16"), // }, // }) // 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.5.2.0/24"), // }, // EnforcePrivateLinkEndpointNetworkPolicies: true, // }) // if err != nil { // return err // } // exampleEndpoint, err := privatelink.NewEndpoint(ctx, "example", &privatelink.EndpointArgs{ // Name: pulumi.String("example-privateendpoint"), // ResourceGroupName: example.Name, // Location: example.Location, // SubnetId: exampleSubnet.ID(), // PrivateServiceConnection: &privatelink.EndpointPrivateServiceConnectionArgs{ // Name: pulumi.String("psc-sig-test"), // IsManualConnection: pulumi.Bool(false), // PrivateConnectionResourceId: exampleService.ID(), // SubresourceNames: pulumi.StringArray{ // pulumi.String("webpubsub"), // }, // }, // }) // if err != nil { // return err // } // _, err = webpubsub.NewNetworkAcl(ctx, "example", &webpubsub.NetworkAclArgs{ // WebPubsubId: exampleService.ID(), // DefaultAction: pulumi.String("Allow"), // PublicNetwork: &webpubsub.NetworkAclPublicNetworkArgs{ // DeniedRequestTypes: pulumi.StringArray{ // pulumi.String("ClientConnection"), // }, // }, // PrivateEndpoints: webpubsub.NetworkAclPrivateEndpointArray{ // &webpubsub.NetworkAclPrivateEndpointArgs{ // Id: exampleEndpoint.ID(), // DeniedRequestTypes: pulumi.StringArray{ // pulumi.String("RESTAPI"), // pulumi.String("ClientConnection"), // }, // }, // }, // }, pulumi.DependsOn([]pulumi.Resource{ // exampleEndpoint, // })) // 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.SignalRService` - 2024-03-01 // // ## Import // // Network ACLs for a Web Pubsub service can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:webpubsub/networkAcl:NetworkAcl example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SignalRService/webPubSub/webpubsub1 // ``` type NetworkAcl struct { pulumi.CustomResourceState // The default action to control the network access when no other rule matches. Possible values are `Allow` and `Deny`. Defaults to `Deny`. DefaultAction pulumi.StringPtrOutput `pulumi:"defaultAction"` // A `privateEndpoint` block as defined below. PrivateEndpoints NetworkAclPrivateEndpointArrayOutput `pulumi:"privateEndpoints"` // A `publicNetwork` block as defined below. PublicNetwork NetworkAclPublicNetworkOutput `pulumi:"publicNetwork"` // The ID of the Web Pubsub service. Changing this forces a new resource to be created. WebPubsubId pulumi.StringOutput `pulumi:"webPubsubId"` } // NewNetworkAcl registers a new resource with the given unique name, arguments, and options. func NewNetworkAcl(ctx *pulumi.Context, name string, args *NetworkAclArgs, opts ...pulumi.ResourceOption) (*NetworkAcl, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PublicNetwork == nil { return nil, errors.New("invalid value for required argument 'PublicNetwork'") } if args.WebPubsubId == nil { return nil, errors.New("invalid value for required argument 'WebPubsubId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkAcl err := ctx.RegisterResource("azure:webpubsub/networkAcl:NetworkAcl", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkAcl gets an existing NetworkAcl 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 GetNetworkAcl(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkAclState, opts ...pulumi.ResourceOption) (*NetworkAcl, error) { var resource NetworkAcl err := ctx.ReadResource("azure:webpubsub/networkAcl:NetworkAcl", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkAcl resources. type networkAclState struct { // The default action to control the network access when no other rule matches. Possible values are `Allow` and `Deny`. Defaults to `Deny`. DefaultAction *string `pulumi:"defaultAction"` // A `privateEndpoint` block as defined below. PrivateEndpoints []NetworkAclPrivateEndpoint `pulumi:"privateEndpoints"` // A `publicNetwork` block as defined below. PublicNetwork *NetworkAclPublicNetwork `pulumi:"publicNetwork"` // The ID of the Web Pubsub service. Changing this forces a new resource to be created. WebPubsubId *string `pulumi:"webPubsubId"` } type NetworkAclState struct { // The default action to control the network access when no other rule matches. Possible values are `Allow` and `Deny`. Defaults to `Deny`. DefaultAction pulumi.StringPtrInput // A `privateEndpoint` block as defined below. PrivateEndpoints NetworkAclPrivateEndpointArrayInput // A `publicNetwork` block as defined below. PublicNetwork NetworkAclPublicNetworkPtrInput // The ID of the Web Pubsub service. Changing this forces a new resource to be created. WebPubsubId pulumi.StringPtrInput } func (NetworkAclState) ElementType() reflect.Type { return reflect.TypeOf((*networkAclState)(nil)).Elem() } type networkAclArgs struct { // The default action to control the network access when no other rule matches. Possible values are `Allow` and `Deny`. Defaults to `Deny`. DefaultAction *string `pulumi:"defaultAction"` // A `privateEndpoint` block as defined below. PrivateEndpoints []NetworkAclPrivateEndpoint `pulumi:"privateEndpoints"` // A `publicNetwork` block as defined below. PublicNetwork NetworkAclPublicNetwork `pulumi:"publicNetwork"` // The ID of the Web Pubsub service. Changing this forces a new resource to be created. WebPubsubId string `pulumi:"webPubsubId"` } // The set of arguments for constructing a NetworkAcl resource. type NetworkAclArgs struct { // The default action to control the network access when no other rule matches. Possible values are `Allow` and `Deny`. Defaults to `Deny`. DefaultAction pulumi.StringPtrInput // A `privateEndpoint` block as defined below. PrivateEndpoints NetworkAclPrivateEndpointArrayInput // A `publicNetwork` block as defined below. PublicNetwork NetworkAclPublicNetworkInput // The ID of the Web Pubsub service. Changing this forces a new resource to be created. WebPubsubId pulumi.StringInput } func (NetworkAclArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkAclArgs)(nil)).Elem() } type NetworkAclInput interface { pulumi.Input ToNetworkAclOutput() NetworkAclOutput ToNetworkAclOutputWithContext(ctx context.Context) NetworkAclOutput } func (*NetworkAcl) ElementType() reflect.Type { return reflect.TypeOf((**NetworkAcl)(nil)).Elem() } func (i *NetworkAcl) ToNetworkAclOutput() NetworkAclOutput { return i.ToNetworkAclOutputWithContext(context.Background()) } func (i *NetworkAcl) ToNetworkAclOutputWithContext(ctx context.Context) NetworkAclOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkAclOutput) } // NetworkAclArrayInput is an input type that accepts NetworkAclArray and NetworkAclArrayOutput values. // You can construct a concrete instance of `NetworkAclArrayInput` via: // // NetworkAclArray{ NetworkAclArgs{...} } type NetworkAclArrayInput interface { pulumi.Input ToNetworkAclArrayOutput() NetworkAclArrayOutput ToNetworkAclArrayOutputWithContext(context.Context) NetworkAclArrayOutput } type NetworkAclArray []NetworkAclInput func (NetworkAclArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkAcl)(nil)).Elem() } func (i NetworkAclArray) ToNetworkAclArrayOutput() NetworkAclArrayOutput { return i.ToNetworkAclArrayOutputWithContext(context.Background()) } func (i NetworkAclArray) ToNetworkAclArrayOutputWithContext(ctx context.Context) NetworkAclArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkAclArrayOutput) } // NetworkAclMapInput is an input type that accepts NetworkAclMap and NetworkAclMapOutput values. // You can construct a concrete instance of `NetworkAclMapInput` via: // // NetworkAclMap{ "key": NetworkAclArgs{...} } type NetworkAclMapInput interface { pulumi.Input ToNetworkAclMapOutput() NetworkAclMapOutput ToNetworkAclMapOutputWithContext(context.Context) NetworkAclMapOutput } type NetworkAclMap map[string]NetworkAclInput func (NetworkAclMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkAcl)(nil)).Elem() } func (i NetworkAclMap) ToNetworkAclMapOutput() NetworkAclMapOutput { return i.ToNetworkAclMapOutputWithContext(context.Background()) } func (i NetworkAclMap) ToNetworkAclMapOutputWithContext(ctx context.Context) NetworkAclMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkAclMapOutput) } type NetworkAclOutput struct{ *pulumi.OutputState } func (NetworkAclOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkAcl)(nil)).Elem() } func (o NetworkAclOutput) ToNetworkAclOutput() NetworkAclOutput { return o } func (o NetworkAclOutput) ToNetworkAclOutputWithContext(ctx context.Context) NetworkAclOutput { return o } // The default action to control the network access when no other rule matches. Possible values are `Allow` and `Deny`. Defaults to `Deny`. func (o NetworkAclOutput) DefaultAction() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkAcl) pulumi.StringPtrOutput { return v.DefaultAction }).(pulumi.StringPtrOutput) } // A `privateEndpoint` block as defined below. func (o NetworkAclOutput) PrivateEndpoints() NetworkAclPrivateEndpointArrayOutput { return o.ApplyT(func(v *NetworkAcl) NetworkAclPrivateEndpointArrayOutput { return v.PrivateEndpoints }).(NetworkAclPrivateEndpointArrayOutput) } // A `publicNetwork` block as defined below. func (o NetworkAclOutput) PublicNetwork() NetworkAclPublicNetworkOutput { return o.ApplyT(func(v *NetworkAcl) NetworkAclPublicNetworkOutput { return v.PublicNetwork }).(NetworkAclPublicNetworkOutput) } // The ID of the Web Pubsub service. Changing this forces a new resource to be created. func (o NetworkAclOutput) WebPubsubId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkAcl) pulumi.StringOutput { return v.WebPubsubId }).(pulumi.StringOutput) } type NetworkAclArrayOutput struct{ *pulumi.OutputState } func (NetworkAclArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkAcl)(nil)).Elem() } func (o NetworkAclArrayOutput) ToNetworkAclArrayOutput() NetworkAclArrayOutput { return o } func (o NetworkAclArrayOutput) ToNetworkAclArrayOutputWithContext(ctx context.Context) NetworkAclArrayOutput { return o } func (o NetworkAclArrayOutput) Index(i pulumi.IntInput) NetworkAclOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkAcl { return vs[0].([]*NetworkAcl)[vs[1].(int)] }).(NetworkAclOutput) } type NetworkAclMapOutput struct{ *pulumi.OutputState } func (NetworkAclMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkAcl)(nil)).Elem() } func (o NetworkAclMapOutput) ToNetworkAclMapOutput() NetworkAclMapOutput { return o } func (o NetworkAclMapOutput) ToNetworkAclMapOutputWithContext(ctx context.Context) NetworkAclMapOutput { return o } func (o NetworkAclMapOutput) MapIndex(k pulumi.StringInput) NetworkAclOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkAcl { return vs[0].(map[string]*NetworkAcl)[vs[1].(string)] }).(NetworkAclOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkAclInput)(nil)).Elem(), &NetworkAcl{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkAclArrayInput)(nil)).Elem(), NetworkAclArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkAclMapInput)(nil)).Elem(), NetworkAclMap{}) pulumi.RegisterOutputType(NetworkAclOutput{}) pulumi.RegisterOutputType(NetworkAclArrayOutput{}) pulumi.RegisterOutputType(NetworkAclMapOutput{}) }
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/webpubsub/getService.go
sdk/go/azure/webpubsub/getService.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 webpubsub 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 Web Pubsub service. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/webpubsub" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := webpubsub.LookupService(ctx, &webpubsub.LookupServiceArgs{ // Name: "test-webpubsub", // ResourceGroupName: "wps-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.SignalRService` - 2024-03-01 func LookupService(ctx *pulumi.Context, args *LookupServiceArgs, opts ...pulumi.InvokeOption) (*LookupServiceResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupServiceResult err := ctx.Invoke("azure:webpubsub/getService:getService", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getService. type LookupServiceArgs struct { // Specifies the name of the Web Pubsub service. Name string `pulumi:"name"` // Specifies the name of the resource group the Web Pubsub service is located in. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getService. type LookupServiceResult struct { AadAuthEnabled bool `pulumi:"aadAuthEnabled"` Capacity int `pulumi:"capacity"` ExternalIp string `pulumi:"externalIp"` // The FQDN of the Web Pubsub service. Hostname string `pulumi:"hostname"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` LocalAuthEnabled bool `pulumi:"localAuthEnabled"` // The Azure location where the Web Pubsub service exists. Location string `pulumi:"location"` Name string `pulumi:"name"` // The primary access key of the Web Pubsub service. PrimaryAccessKey string `pulumi:"primaryAccessKey"` // The primary connection string of the Web Pubsub service. PrimaryConnectionString string `pulumi:"primaryConnectionString"` PublicNetworkAccessEnabled bool `pulumi:"publicNetworkAccessEnabled"` // The publicly accessible port of the Web Pubsub service which is designed for browser/client use. PublicPort int `pulumi:"publicPort"` ResourceGroupName string `pulumi:"resourceGroupName"` // The secondary access key of the Web Pubsub service. SecondaryAccessKey string `pulumi:"secondaryAccessKey"` // The secondary connection string of the Web Pubsub service. SecondaryConnectionString string `pulumi:"secondaryConnectionString"` // The publicly accessible port of the Web Pubsub service which is designed for customer server side use. ServerPort int `pulumi:"serverPort"` Sku string `pulumi:"sku"` Tags map[string]string `pulumi:"tags"` TlsClientCertEnabled bool `pulumi:"tlsClientCertEnabled"` Version string `pulumi:"version"` } func LookupServiceOutput(ctx *pulumi.Context, args LookupServiceOutputArgs, opts ...pulumi.InvokeOption) LookupServiceResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupServiceResultOutput, error) { args := v.(LookupServiceArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:webpubsub/getService:getService", args, LookupServiceResultOutput{}, options).(LookupServiceResultOutput), nil }).(LookupServiceResultOutput) } // A collection of arguments for invoking getService. type LookupServiceOutputArgs struct { // Specifies the name of the Web Pubsub service. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group the Web Pubsub service is located in. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupServiceOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupServiceArgs)(nil)).Elem() } // A collection of values returned by getService. type LookupServiceResultOutput struct{ *pulumi.OutputState } func (LookupServiceResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupServiceResult)(nil)).Elem() } func (o LookupServiceResultOutput) ToLookupServiceResultOutput() LookupServiceResultOutput { return o } func (o LookupServiceResultOutput) ToLookupServiceResultOutputWithContext(ctx context.Context) LookupServiceResultOutput { return o } func (o LookupServiceResultOutput) AadAuthEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupServiceResult) bool { return v.AadAuthEnabled }).(pulumi.BoolOutput) } func (o LookupServiceResultOutput) Capacity() pulumi.IntOutput { return o.ApplyT(func(v LookupServiceResult) int { return v.Capacity }).(pulumi.IntOutput) } func (o LookupServiceResultOutput) ExternalIp() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.ExternalIp }).(pulumi.StringOutput) } // The FQDN of the Web Pubsub service. func (o LookupServiceResultOutput) Hostname() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.Hostname }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupServiceResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupServiceResultOutput) LocalAuthEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupServiceResult) bool { return v.LocalAuthEnabled }).(pulumi.BoolOutput) } // The Azure location where the Web Pubsub service exists. func (o LookupServiceResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupServiceResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.Name }).(pulumi.StringOutput) } // The primary access key of the Web Pubsub service. func (o LookupServiceResultOutput) PrimaryAccessKey() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.PrimaryAccessKey }).(pulumi.StringOutput) } // The primary connection string of the Web Pubsub service. func (o LookupServiceResultOutput) PrimaryConnectionString() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.PrimaryConnectionString }).(pulumi.StringOutput) } func (o LookupServiceResultOutput) PublicNetworkAccessEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupServiceResult) bool { return v.PublicNetworkAccessEnabled }).(pulumi.BoolOutput) } // The publicly accessible port of the Web Pubsub service which is designed for browser/client use. func (o LookupServiceResultOutput) PublicPort() pulumi.IntOutput { return o.ApplyT(func(v LookupServiceResult) int { return v.PublicPort }).(pulumi.IntOutput) } func (o LookupServiceResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The secondary access key of the Web Pubsub service. func (o LookupServiceResultOutput) SecondaryAccessKey() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.SecondaryAccessKey }).(pulumi.StringOutput) } // The secondary connection string of the Web Pubsub service. func (o LookupServiceResultOutput) SecondaryConnectionString() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.SecondaryConnectionString }).(pulumi.StringOutput) } // The publicly accessible port of the Web Pubsub service which is designed for customer server side use. func (o LookupServiceResultOutput) ServerPort() pulumi.IntOutput { return o.ApplyT(func(v LookupServiceResult) int { return v.ServerPort }).(pulumi.IntOutput) } func (o LookupServiceResultOutput) Sku() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.Sku }).(pulumi.StringOutput) } func (o LookupServiceResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupServiceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func (o LookupServiceResultOutput) TlsClientCertEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupServiceResult) bool { return v.TlsClientCertEnabled }).(pulumi.BoolOutput) } func (o LookupServiceResultOutput) Version() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.Version }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupServiceResultOutput{}) }
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/managementgroups/init.go
sdk/go/azure/managementgroups/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 managementgroups 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:managementgroups/managementGroup:ManagementGroup": r = &ManagementGroup{} 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", "managementgroups/managementGroup", &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/managementgroups/managementGroup.go
sdk/go/azure/managementgroups/managementGroup.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 managementgroups import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Management Group. // // !> **Note:** Configuring `subscriptionIds` is not supported when using the `management.GroupSubscriptionAssociation` resource, results will be unpredictable. // // ## 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/management" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleParent, err := management.NewGroup(ctx, "example_parent", &management.GroupArgs{ // DisplayName: pulumi.String("ParentGroup"), // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.SubscriptionId), // }, // }) // if err != nil { // return err // } // _, err = management.NewGroup(ctx, "example_child", &management.GroupArgs{ // DisplayName: pulumi.String("ChildGroup"), // ParentManagementGroupId: exampleParent.ID(), // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.SubscriptionId), // }, // }) // 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` - 2020-05-01 // // ## Import // // Management Groups can be imported using the `management group resource id`, e.g. // // ```sh // $ pulumi import azure:managementgroups/managementGroup:ManagementGroup example /providers/Microsoft.Management/managementGroups/group1 // ``` // // Deprecated: azure.managementgroups.ManagementGroup has been deprecated in favor of azure.management.Group type ManagementGroup struct { pulumi.CustomResourceState // A friendly name for this Management Group. If not specified, this will be the same as the `name`. DisplayName pulumi.StringOutput `pulumi:"displayName"` // The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Parent Management Group. ParentManagementGroupId pulumi.StringOutput `pulumi:"parentManagementGroupId"` // A list of Subscription GUIDs which should be assigned to the Management Group. // // > **Note:** To clear all Subscriptions from the Management Group set `subscriptionIds` to an empty list SubscriptionIds pulumi.StringArrayOutput `pulumi:"subscriptionIds"` // The Management Group ID with the Tenant ID prefix. TenantScopedId pulumi.StringOutput `pulumi:"tenantScopedId"` } // NewManagementGroup registers a new resource with the given unique name, arguments, and options. func NewManagementGroup(ctx *pulumi.Context, name string, args *ManagementGroupArgs, opts ...pulumi.ResourceOption) (*ManagementGroup, error) { if args == nil { args = &ManagementGroupArgs{} } opts = internal.PkgResourceDefaultOpts(opts) var resource ManagementGroup err := ctx.RegisterResource("azure:managementgroups/managementGroup:ManagementGroup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetManagementGroup gets an existing ManagementGroup 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 GetManagementGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ManagementGroupState, opts ...pulumi.ResourceOption) (*ManagementGroup, error) { var resource ManagementGroup err := ctx.ReadResource("azure:managementgroups/managementGroup:ManagementGroup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ManagementGroup resources. type managementGroupState struct { // A friendly name for this Management Group. If not specified, this will be the same as the `name`. DisplayName *string `pulumi:"displayName"` // The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Parent Management Group. ParentManagementGroupId *string `pulumi:"parentManagementGroupId"` // A list of Subscription GUIDs which should be assigned to the Management Group. // // > **Note:** To clear all Subscriptions from the Management Group set `subscriptionIds` to an empty list SubscriptionIds []string `pulumi:"subscriptionIds"` // The Management Group ID with the Tenant ID prefix. TenantScopedId *string `pulumi:"tenantScopedId"` } type ManagementGroupState struct { // A friendly name for this Management Group. If not specified, this will be the same as the `name`. DisplayName pulumi.StringPtrInput // The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Parent Management Group. ParentManagementGroupId pulumi.StringPtrInput // A list of Subscription GUIDs which should be assigned to the Management Group. // // > **Note:** To clear all Subscriptions from the Management Group set `subscriptionIds` to an empty list SubscriptionIds pulumi.StringArrayInput // The Management Group ID with the Tenant ID prefix. TenantScopedId pulumi.StringPtrInput } func (ManagementGroupState) ElementType() reflect.Type { return reflect.TypeOf((*managementGroupState)(nil)).Elem() } type managementGroupArgs struct { // A friendly name for this Management Group. If not specified, this will be the same as the `name`. DisplayName *string `pulumi:"displayName"` // The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Parent Management Group. ParentManagementGroupId *string `pulumi:"parentManagementGroupId"` // A list of Subscription GUIDs which should be assigned to the Management Group. // // > **Note:** To clear all Subscriptions from the Management Group set `subscriptionIds` to an empty list SubscriptionIds []string `pulumi:"subscriptionIds"` } // The set of arguments for constructing a ManagementGroup resource. type ManagementGroupArgs struct { // A friendly name for this Management Group. If not specified, this will be the same as the `name`. DisplayName pulumi.StringPtrInput // The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Parent Management Group. ParentManagementGroupId pulumi.StringPtrInput // A list of Subscription GUIDs which should be assigned to the Management Group. // // > **Note:** To clear all Subscriptions from the Management Group set `subscriptionIds` to an empty list SubscriptionIds pulumi.StringArrayInput } func (ManagementGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*managementGroupArgs)(nil)).Elem() } type ManagementGroupInput interface { pulumi.Input ToManagementGroupOutput() ManagementGroupOutput ToManagementGroupOutputWithContext(ctx context.Context) ManagementGroupOutput } func (*ManagementGroup) ElementType() reflect.Type { return reflect.TypeOf((**ManagementGroup)(nil)).Elem() } func (i *ManagementGroup) ToManagementGroupOutput() ManagementGroupOutput { return i.ToManagementGroupOutputWithContext(context.Background()) } func (i *ManagementGroup) ToManagementGroupOutputWithContext(ctx context.Context) ManagementGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagementGroupOutput) } // ManagementGroupArrayInput is an input type that accepts ManagementGroupArray and ManagementGroupArrayOutput values. // You can construct a concrete instance of `ManagementGroupArrayInput` via: // // ManagementGroupArray{ ManagementGroupArgs{...} } type ManagementGroupArrayInput interface { pulumi.Input ToManagementGroupArrayOutput() ManagementGroupArrayOutput ToManagementGroupArrayOutputWithContext(context.Context) ManagementGroupArrayOutput } type ManagementGroupArray []ManagementGroupInput func (ManagementGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagementGroup)(nil)).Elem() } func (i ManagementGroupArray) ToManagementGroupArrayOutput() ManagementGroupArrayOutput { return i.ToManagementGroupArrayOutputWithContext(context.Background()) } func (i ManagementGroupArray) ToManagementGroupArrayOutputWithContext(ctx context.Context) ManagementGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagementGroupArrayOutput) } // ManagementGroupMapInput is an input type that accepts ManagementGroupMap and ManagementGroupMapOutput values. // You can construct a concrete instance of `ManagementGroupMapInput` via: // // ManagementGroupMap{ "key": ManagementGroupArgs{...} } type ManagementGroupMapInput interface { pulumi.Input ToManagementGroupMapOutput() ManagementGroupMapOutput ToManagementGroupMapOutputWithContext(context.Context) ManagementGroupMapOutput } type ManagementGroupMap map[string]ManagementGroupInput func (ManagementGroupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagementGroup)(nil)).Elem() } func (i ManagementGroupMap) ToManagementGroupMapOutput() ManagementGroupMapOutput { return i.ToManagementGroupMapOutputWithContext(context.Background()) } func (i ManagementGroupMap) ToManagementGroupMapOutputWithContext(ctx context.Context) ManagementGroupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagementGroupMapOutput) } type ManagementGroupOutput struct{ *pulumi.OutputState } func (ManagementGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((**ManagementGroup)(nil)).Elem() } func (o ManagementGroupOutput) ToManagementGroupOutput() ManagementGroupOutput { return o } func (o ManagementGroupOutput) ToManagementGroupOutputWithContext(ctx context.Context) ManagementGroupOutput { return o } // A friendly name for this Management Group. If not specified, this will be the same as the `name`. func (o ManagementGroupOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *ManagementGroup) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created. func (o ManagementGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ManagementGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Parent Management Group. func (o ManagementGroupOutput) ParentManagementGroupId() pulumi.StringOutput { return o.ApplyT(func(v *ManagementGroup) pulumi.StringOutput { return v.ParentManagementGroupId }).(pulumi.StringOutput) } // A list of Subscription GUIDs which should be assigned to the Management Group. // // > **Note:** To clear all Subscriptions from the Management Group set `subscriptionIds` to an empty list func (o ManagementGroupOutput) SubscriptionIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *ManagementGroup) pulumi.StringArrayOutput { return v.SubscriptionIds }).(pulumi.StringArrayOutput) } // The Management Group ID with the Tenant ID prefix. func (o ManagementGroupOutput) TenantScopedId() pulumi.StringOutput { return o.ApplyT(func(v *ManagementGroup) pulumi.StringOutput { return v.TenantScopedId }).(pulumi.StringOutput) } type ManagementGroupArrayOutput struct{ *pulumi.OutputState } func (ManagementGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagementGroup)(nil)).Elem() } func (o ManagementGroupArrayOutput) ToManagementGroupArrayOutput() ManagementGroupArrayOutput { return o } func (o ManagementGroupArrayOutput) ToManagementGroupArrayOutputWithContext(ctx context.Context) ManagementGroupArrayOutput { return o } func (o ManagementGroupArrayOutput) Index(i pulumi.IntInput) ManagementGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagementGroup { return vs[0].([]*ManagementGroup)[vs[1].(int)] }).(ManagementGroupOutput) } type ManagementGroupMapOutput struct{ *pulumi.OutputState } func (ManagementGroupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagementGroup)(nil)).Elem() } func (o ManagementGroupMapOutput) ToManagementGroupMapOutput() ManagementGroupMapOutput { return o } func (o ManagementGroupMapOutput) ToManagementGroupMapOutputWithContext(ctx context.Context) ManagementGroupMapOutput { return o } func (o ManagementGroupMapOutput) MapIndex(k pulumi.StringInput) ManagementGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagementGroup { return vs[0].(map[string]*ManagementGroup)[vs[1].(string)] }).(ManagementGroupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ManagementGroupInput)(nil)).Elem(), &ManagementGroup{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagementGroupArrayInput)(nil)).Elem(), ManagementGroupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagementGroupMapInput)(nil)).Elem(), ManagementGroupMap{}) pulumi.RegisterOutputType(ManagementGroupOutput{}) pulumi.RegisterOutputType(ManagementGroupArrayOutput{}) pulumi.RegisterOutputType(ManagementGroupMapOutput{}) }
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/managementgroups/getManagementGroup.go
sdk/go/azure/managementgroups/getManagementGroup.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 managementgroups 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 Management Group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := management.LookupGroup(ctx, &management.LookupGroupArgs{ // Name: pulumi.StringRef("00000000-0000-0000-0000-000000000000"), // }, nil) // if err != nil { // return err // } // ctx.Export("displayName", example.DisplayName) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Management` - 2020-05-01 // // Deprecated: azure.managementgroups.getManagementGroup has been deprecated in favor of azure.management.getGroup func LookupManagementGroup(ctx *pulumi.Context, args *LookupManagementGroupArgs, opts ...pulumi.InvokeOption) (*LookupManagementGroupResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupManagementGroupResult err := ctx.Invoke("azure:managementgroups/getManagementGroup:getManagementGroup", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getManagementGroup. type LookupManagementGroupArgs struct { // Specifies the display name of this Management Group. // // > **NOTE** Whilst multiple management groups may share the same display name, when filtering, the provider expects a single management group to be found with this name. DisplayName *string `pulumi:"displayName"` // Specifies the name or UUID of this Management Group. Name *string `pulumi:"name"` } // A collection of values returned by getManagementGroup. type LookupManagementGroupResult struct { // A list of Management Group IDs which directly or indirectly belong to this Management Group. AllManagementGroupIds []string `pulumi:"allManagementGroupIds"` // A list of Subscription IDs which are assigned to this Management Group or its children Management Groups. AllSubscriptionIds []string `pulumi:"allSubscriptionIds"` DisplayName string `pulumi:"displayName"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // A list of Management Group IDs which directly belong to this Management Group. ManagementGroupIds []string `pulumi:"managementGroupIds"` Name string `pulumi:"name"` // The ID of any Parent Management Group. ParentManagementGroupId string `pulumi:"parentManagementGroupId"` // A list of Subscription IDs which are directly assigned to this Management Group. SubscriptionIds []string `pulumi:"subscriptionIds"` // The Management Group ID with the Tenant ID prefix. TenantScopedId string `pulumi:"tenantScopedId"` } func LookupManagementGroupOutput(ctx *pulumi.Context, args LookupManagementGroupOutputArgs, opts ...pulumi.InvokeOption) LookupManagementGroupResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupManagementGroupResultOutput, error) { args := v.(LookupManagementGroupArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:managementgroups/getManagementGroup:getManagementGroup", args, LookupManagementGroupResultOutput{}, options).(LookupManagementGroupResultOutput), nil }).(LookupManagementGroupResultOutput) } // A collection of arguments for invoking getManagementGroup. type LookupManagementGroupOutputArgs struct { // Specifies the display name of this Management Group. // // > **NOTE** Whilst multiple management groups may share the same display name, when filtering, the provider expects a single management group to be found with this name. DisplayName pulumi.StringPtrInput `pulumi:"displayName"` // Specifies the name or UUID of this Management Group. Name pulumi.StringPtrInput `pulumi:"name"` } func (LookupManagementGroupOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupManagementGroupArgs)(nil)).Elem() } // A collection of values returned by getManagementGroup. type LookupManagementGroupResultOutput struct{ *pulumi.OutputState } func (LookupManagementGroupResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupManagementGroupResult)(nil)).Elem() } func (o LookupManagementGroupResultOutput) ToLookupManagementGroupResultOutput() LookupManagementGroupResultOutput { return o } func (o LookupManagementGroupResultOutput) ToLookupManagementGroupResultOutputWithContext(ctx context.Context) LookupManagementGroupResultOutput { return o } // A list of Management Group IDs which directly or indirectly belong to this Management Group. func (o LookupManagementGroupResultOutput) AllManagementGroupIds() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupManagementGroupResult) []string { return v.AllManagementGroupIds }).(pulumi.StringArrayOutput) } // A list of Subscription IDs which are assigned to this Management Group or its children Management Groups. func (o LookupManagementGroupResultOutput) AllSubscriptionIds() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupManagementGroupResult) []string { return v.AllSubscriptionIds }).(pulumi.StringArrayOutput) } func (o LookupManagementGroupResultOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v LookupManagementGroupResult) string { return v.DisplayName }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupManagementGroupResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupManagementGroupResult) string { return v.Id }).(pulumi.StringOutput) } // A list of Management Group IDs which directly belong to this Management Group. func (o LookupManagementGroupResultOutput) ManagementGroupIds() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupManagementGroupResult) []string { return v.ManagementGroupIds }).(pulumi.StringArrayOutput) } func (o LookupManagementGroupResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupManagementGroupResult) string { return v.Name }).(pulumi.StringOutput) } // The ID of any Parent Management Group. func (o LookupManagementGroupResultOutput) ParentManagementGroupId() pulumi.StringOutput { return o.ApplyT(func(v LookupManagementGroupResult) string { return v.ParentManagementGroupId }).(pulumi.StringOutput) } // A list of Subscription IDs which are directly assigned to this Management Group. func (o LookupManagementGroupResultOutput) SubscriptionIds() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupManagementGroupResult) []string { return v.SubscriptionIds }).(pulumi.StringArrayOutput) } // The Management Group ID with the Tenant ID prefix. func (o LookupManagementGroupResultOutput) TenantScopedId() pulumi.StringOutput { return o.ApplyT(func(v LookupManagementGroupResult) string { return v.TenantScopedId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupManagementGroupResultOutput{}) }
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/policy/getPolicyDefintion.go
sdk/go/azure/policy/getPolicyDefintion.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 policy 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 Policy Definition, both custom and built in. Retrieves Policy Definitions from your current subscription by default. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/policy" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := policy.GetPolicyDefintion(ctx, &policy.GetPolicyDefintionArgs{ // DisplayName: pulumi.StringRef("Allowed resource types"), // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // return nil // }) // } // // ``` func GetPolicyDefintion(ctx *pulumi.Context, args *GetPolicyDefintionArgs, opts ...pulumi.InvokeOption) (*GetPolicyDefintionResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetPolicyDefintionResult err := ctx.Invoke("azure:policy/getPolicyDefintion:getPolicyDefintion", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getPolicyDefintion. type GetPolicyDefintionArgs struct { // Specifies the display name of the Policy Definition. Conflicts with `name`. // // > **Note:** Looking up policies by `displayName` is not recommended by the Azure Policy team as the property is not unique nor immutable. As such errors may occur when there are multiple policy definitions with same display name or the display name is changed. To avoid these types of errors you may wish to use the `name` property instead. DisplayName *string `pulumi:"displayName"` // Only retrieve Policy Definitions from this Management Group. ManagementGroupName *string `pulumi:"managementGroupName"` // Specifies the name of the Policy Definition. Conflicts with `displayName`. Name *string `pulumi:"name"` } // A collection of values returned by getPolicyDefintion. type GetPolicyDefintionResult struct { // The Description of the Policy. Description string `pulumi:"description"` DisplayName string `pulumi:"displayName"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` ManagementGroupName *string `pulumi:"managementGroupName"` // Any Metadata defined in the Policy. Metadata string `pulumi:"metadata"` // The Mode of the Policy. Mode string `pulumi:"mode"` Name string `pulumi:"name"` // Any Parameters defined in the Policy. Parameters string `pulumi:"parameters"` // The Rule as defined (in JSON) in the Policy. PolicyRule string `pulumi:"policyRule"` // The Type of the Policy. Possible values are `BuiltIn`, `Custom` and `NotSpecified`. PolicyType string `pulumi:"policyType"` // A list of role definition id extracted from `policyRule` required for remediation. RoleDefinitionIds []string `pulumi:"roleDefinitionIds"` // The Type of Policy. Type string `pulumi:"type"` } func GetPolicyDefintionOutput(ctx *pulumi.Context, args GetPolicyDefintionOutputArgs, opts ...pulumi.InvokeOption) GetPolicyDefintionResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetPolicyDefintionResultOutput, error) { args := v.(GetPolicyDefintionArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:policy/getPolicyDefintion:getPolicyDefintion", args, GetPolicyDefintionResultOutput{}, options).(GetPolicyDefintionResultOutput), nil }).(GetPolicyDefintionResultOutput) } // A collection of arguments for invoking getPolicyDefintion. type GetPolicyDefintionOutputArgs struct { // Specifies the display name of the Policy Definition. Conflicts with `name`. // // > **Note:** Looking up policies by `displayName` is not recommended by the Azure Policy team as the property is not unique nor immutable. As such errors may occur when there are multiple policy definitions with same display name or the display name is changed. To avoid these types of errors you may wish to use the `name` property instead. DisplayName pulumi.StringPtrInput `pulumi:"displayName"` // Only retrieve Policy Definitions from this Management Group. ManagementGroupName pulumi.StringPtrInput `pulumi:"managementGroupName"` // Specifies the name of the Policy Definition. Conflicts with `displayName`. Name pulumi.StringPtrInput `pulumi:"name"` } func (GetPolicyDefintionOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetPolicyDefintionArgs)(nil)).Elem() } // A collection of values returned by getPolicyDefintion. type GetPolicyDefintionResultOutput struct{ *pulumi.OutputState } func (GetPolicyDefintionResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetPolicyDefintionResult)(nil)).Elem() } func (o GetPolicyDefintionResultOutput) ToGetPolicyDefintionResultOutput() GetPolicyDefintionResultOutput { return o } func (o GetPolicyDefintionResultOutput) ToGetPolicyDefintionResultOutputWithContext(ctx context.Context) GetPolicyDefintionResultOutput { return o } // The Description of the Policy. func (o GetPolicyDefintionResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionResult) string { return v.Description }).(pulumi.StringOutput) } func (o GetPolicyDefintionResultOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionResult) string { return v.DisplayName }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetPolicyDefintionResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetPolicyDefintionResultOutput) ManagementGroupName() pulumi.StringPtrOutput { return o.ApplyT(func(v GetPolicyDefintionResult) *string { return v.ManagementGroupName }).(pulumi.StringPtrOutput) } // Any Metadata defined in the Policy. func (o GetPolicyDefintionResultOutput) Metadata() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionResult) string { return v.Metadata }).(pulumi.StringOutput) } // The Mode of the Policy. func (o GetPolicyDefintionResultOutput) Mode() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionResult) string { return v.Mode }).(pulumi.StringOutput) } func (o GetPolicyDefintionResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionResult) string { return v.Name }).(pulumi.StringOutput) } // Any Parameters defined in the Policy. func (o GetPolicyDefintionResultOutput) Parameters() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionResult) string { return v.Parameters }).(pulumi.StringOutput) } // The Rule as defined (in JSON) in the Policy. func (o GetPolicyDefintionResultOutput) PolicyRule() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionResult) string { return v.PolicyRule }).(pulumi.StringOutput) } // The Type of the Policy. Possible values are `BuiltIn`, `Custom` and `NotSpecified`. func (o GetPolicyDefintionResultOutput) PolicyType() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionResult) string { return v.PolicyType }).(pulumi.StringOutput) } // A list of role definition id extracted from `policyRule` required for remediation. func (o GetPolicyDefintionResultOutput) RoleDefinitionIds() pulumi.StringArrayOutput { return o.ApplyT(func(v GetPolicyDefintionResult) []string { return v.RoleDefinitionIds }).(pulumi.StringArrayOutput) } // The Type of Policy. func (o GetPolicyDefintionResultOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionResult) string { return v.Type }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetPolicyDefintionResultOutput{}) }
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/policy/init.go
sdk/go/azure/policy/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 policy 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:policy/definition:Definition": r = &Definition{} case "azure:policy/policySetDefinition:PolicySetDefinition": r = &PolicySetDefinition{} case "azure:policy/virtualMachineConfigurationAssignment:VirtualMachineConfigurationAssignment": r = &VirtualMachineConfigurationAssignment{} 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", "policy/definition", &module{version}, ) pulumi.RegisterResourceModule( "azure", "policy/policySetDefinition", &module{version}, ) pulumi.RegisterResourceModule( "azure", "policy/virtualMachineConfigurationAssignment", &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/policy/pulumiTypes.go
sdk/go/azure/policy/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 policy 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 PolicySetDefinitionPolicyDefinitionGroup struct { // The ID of a resource that contains additional metadata for this Policy Definition Group. AdditionalMetadataResourceId *string `pulumi:"additionalMetadataResourceId"` // The category of this Policy Definition Group. Category *string `pulumi:"category"` // The description of this Policy Definition Group. Description *string `pulumi:"description"` // The display name of this Policy Definition Group. DisplayName *string `pulumi:"displayName"` // The name which should be used for this Policy Definition Group. Name string `pulumi:"name"` } // PolicySetDefinitionPolicyDefinitionGroupInput is an input type that accepts PolicySetDefinitionPolicyDefinitionGroupArgs and PolicySetDefinitionPolicyDefinitionGroupOutput values. // You can construct a concrete instance of `PolicySetDefinitionPolicyDefinitionGroupInput` via: // // PolicySetDefinitionPolicyDefinitionGroupArgs{...} type PolicySetDefinitionPolicyDefinitionGroupInput interface { pulumi.Input ToPolicySetDefinitionPolicyDefinitionGroupOutput() PolicySetDefinitionPolicyDefinitionGroupOutput ToPolicySetDefinitionPolicyDefinitionGroupOutputWithContext(context.Context) PolicySetDefinitionPolicyDefinitionGroupOutput } type PolicySetDefinitionPolicyDefinitionGroupArgs struct { // The ID of a resource that contains additional metadata for this Policy Definition Group. AdditionalMetadataResourceId pulumi.StringPtrInput `pulumi:"additionalMetadataResourceId"` // The category of this Policy Definition Group. Category pulumi.StringPtrInput `pulumi:"category"` // The description of this Policy Definition Group. Description pulumi.StringPtrInput `pulumi:"description"` // The display name of this Policy Definition Group. DisplayName pulumi.StringPtrInput `pulumi:"displayName"` // The name which should be used for this Policy Definition Group. Name pulumi.StringInput `pulumi:"name"` } func (PolicySetDefinitionPolicyDefinitionGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*PolicySetDefinitionPolicyDefinitionGroup)(nil)).Elem() } func (i PolicySetDefinitionPolicyDefinitionGroupArgs) ToPolicySetDefinitionPolicyDefinitionGroupOutput() PolicySetDefinitionPolicyDefinitionGroupOutput { return i.ToPolicySetDefinitionPolicyDefinitionGroupOutputWithContext(context.Background()) } func (i PolicySetDefinitionPolicyDefinitionGroupArgs) ToPolicySetDefinitionPolicyDefinitionGroupOutputWithContext(ctx context.Context) PolicySetDefinitionPolicyDefinitionGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicySetDefinitionPolicyDefinitionGroupOutput) } // PolicySetDefinitionPolicyDefinitionGroupArrayInput is an input type that accepts PolicySetDefinitionPolicyDefinitionGroupArray and PolicySetDefinitionPolicyDefinitionGroupArrayOutput values. // You can construct a concrete instance of `PolicySetDefinitionPolicyDefinitionGroupArrayInput` via: // // PolicySetDefinitionPolicyDefinitionGroupArray{ PolicySetDefinitionPolicyDefinitionGroupArgs{...} } type PolicySetDefinitionPolicyDefinitionGroupArrayInput interface { pulumi.Input ToPolicySetDefinitionPolicyDefinitionGroupArrayOutput() PolicySetDefinitionPolicyDefinitionGroupArrayOutput ToPolicySetDefinitionPolicyDefinitionGroupArrayOutputWithContext(context.Context) PolicySetDefinitionPolicyDefinitionGroupArrayOutput } type PolicySetDefinitionPolicyDefinitionGroupArray []PolicySetDefinitionPolicyDefinitionGroupInput func (PolicySetDefinitionPolicyDefinitionGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]PolicySetDefinitionPolicyDefinitionGroup)(nil)).Elem() } func (i PolicySetDefinitionPolicyDefinitionGroupArray) ToPolicySetDefinitionPolicyDefinitionGroupArrayOutput() PolicySetDefinitionPolicyDefinitionGroupArrayOutput { return i.ToPolicySetDefinitionPolicyDefinitionGroupArrayOutputWithContext(context.Background()) } func (i PolicySetDefinitionPolicyDefinitionGroupArray) ToPolicySetDefinitionPolicyDefinitionGroupArrayOutputWithContext(ctx context.Context) PolicySetDefinitionPolicyDefinitionGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicySetDefinitionPolicyDefinitionGroupArrayOutput) } type PolicySetDefinitionPolicyDefinitionGroupOutput struct{ *pulumi.OutputState } func (PolicySetDefinitionPolicyDefinitionGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((*PolicySetDefinitionPolicyDefinitionGroup)(nil)).Elem() } func (o PolicySetDefinitionPolicyDefinitionGroupOutput) ToPolicySetDefinitionPolicyDefinitionGroupOutput() PolicySetDefinitionPolicyDefinitionGroupOutput { return o } func (o PolicySetDefinitionPolicyDefinitionGroupOutput) ToPolicySetDefinitionPolicyDefinitionGroupOutputWithContext(ctx context.Context) PolicySetDefinitionPolicyDefinitionGroupOutput { return o } // The ID of a resource that contains additional metadata for this Policy Definition Group. func (o PolicySetDefinitionPolicyDefinitionGroupOutput) AdditionalMetadataResourceId() pulumi.StringPtrOutput { return o.ApplyT(func(v PolicySetDefinitionPolicyDefinitionGroup) *string { return v.AdditionalMetadataResourceId }).(pulumi.StringPtrOutput) } // The category of this Policy Definition Group. func (o PolicySetDefinitionPolicyDefinitionGroupOutput) Category() pulumi.StringPtrOutput { return o.ApplyT(func(v PolicySetDefinitionPolicyDefinitionGroup) *string { return v.Category }).(pulumi.StringPtrOutput) } // The description of this Policy Definition Group. func (o PolicySetDefinitionPolicyDefinitionGroupOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v PolicySetDefinitionPolicyDefinitionGroup) *string { return v.Description }).(pulumi.StringPtrOutput) } // The display name of this Policy Definition Group. func (o PolicySetDefinitionPolicyDefinitionGroupOutput) DisplayName() pulumi.StringPtrOutput { return o.ApplyT(func(v PolicySetDefinitionPolicyDefinitionGroup) *string { return v.DisplayName }).(pulumi.StringPtrOutput) } // The name which should be used for this Policy Definition Group. func (o PolicySetDefinitionPolicyDefinitionGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v PolicySetDefinitionPolicyDefinitionGroup) string { return v.Name }).(pulumi.StringOutput) } type PolicySetDefinitionPolicyDefinitionGroupArrayOutput struct{ *pulumi.OutputState } func (PolicySetDefinitionPolicyDefinitionGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]PolicySetDefinitionPolicyDefinitionGroup)(nil)).Elem() } func (o PolicySetDefinitionPolicyDefinitionGroupArrayOutput) ToPolicySetDefinitionPolicyDefinitionGroupArrayOutput() PolicySetDefinitionPolicyDefinitionGroupArrayOutput { return o } func (o PolicySetDefinitionPolicyDefinitionGroupArrayOutput) ToPolicySetDefinitionPolicyDefinitionGroupArrayOutputWithContext(ctx context.Context) PolicySetDefinitionPolicyDefinitionGroupArrayOutput { return o } func (o PolicySetDefinitionPolicyDefinitionGroupArrayOutput) Index(i pulumi.IntInput) PolicySetDefinitionPolicyDefinitionGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) PolicySetDefinitionPolicyDefinitionGroup { return vs[0].([]PolicySetDefinitionPolicyDefinitionGroup)[vs[1].(int)] }).(PolicySetDefinitionPolicyDefinitionGroupOutput) } type PolicySetDefinitionPolicyDefinitionReference struct { // Parameter values for the references Policy Definition in JSON format. ParameterValues *string `pulumi:"parameterValues"` // The ID of the Policy Definition to include in this Policy Set Definition. PolicyDefinitionId string `pulumi:"policyDefinitionId"` // Specifies a list of Policy Definition Groups names that this Policy Definition Reference belongs to. PolicyGroupNames []string `pulumi:"policyGroupNames"` // A unique ID within this Policy Set Definition for this Policy Definition Reference. ReferenceId *string `pulumi:"referenceId"` // The version of the Policy Definition to use. Version *string `pulumi:"version"` } // PolicySetDefinitionPolicyDefinitionReferenceInput is an input type that accepts PolicySetDefinitionPolicyDefinitionReferenceArgs and PolicySetDefinitionPolicyDefinitionReferenceOutput values. // You can construct a concrete instance of `PolicySetDefinitionPolicyDefinitionReferenceInput` via: // // PolicySetDefinitionPolicyDefinitionReferenceArgs{...} type PolicySetDefinitionPolicyDefinitionReferenceInput interface { pulumi.Input ToPolicySetDefinitionPolicyDefinitionReferenceOutput() PolicySetDefinitionPolicyDefinitionReferenceOutput ToPolicySetDefinitionPolicyDefinitionReferenceOutputWithContext(context.Context) PolicySetDefinitionPolicyDefinitionReferenceOutput } type PolicySetDefinitionPolicyDefinitionReferenceArgs struct { // Parameter values for the references Policy Definition in JSON format. ParameterValues pulumi.StringPtrInput `pulumi:"parameterValues"` // The ID of the Policy Definition to include in this Policy Set Definition. PolicyDefinitionId pulumi.StringInput `pulumi:"policyDefinitionId"` // Specifies a list of Policy Definition Groups names that this Policy Definition Reference belongs to. PolicyGroupNames pulumi.StringArrayInput `pulumi:"policyGroupNames"` // A unique ID within this Policy Set Definition for this Policy Definition Reference. ReferenceId pulumi.StringPtrInput `pulumi:"referenceId"` // The version of the Policy Definition to use. Version pulumi.StringPtrInput `pulumi:"version"` } func (PolicySetDefinitionPolicyDefinitionReferenceArgs) ElementType() reflect.Type { return reflect.TypeOf((*PolicySetDefinitionPolicyDefinitionReference)(nil)).Elem() } func (i PolicySetDefinitionPolicyDefinitionReferenceArgs) ToPolicySetDefinitionPolicyDefinitionReferenceOutput() PolicySetDefinitionPolicyDefinitionReferenceOutput { return i.ToPolicySetDefinitionPolicyDefinitionReferenceOutputWithContext(context.Background()) } func (i PolicySetDefinitionPolicyDefinitionReferenceArgs) ToPolicySetDefinitionPolicyDefinitionReferenceOutputWithContext(ctx context.Context) PolicySetDefinitionPolicyDefinitionReferenceOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicySetDefinitionPolicyDefinitionReferenceOutput) } // PolicySetDefinitionPolicyDefinitionReferenceArrayInput is an input type that accepts PolicySetDefinitionPolicyDefinitionReferenceArray and PolicySetDefinitionPolicyDefinitionReferenceArrayOutput values. // You can construct a concrete instance of `PolicySetDefinitionPolicyDefinitionReferenceArrayInput` via: // // PolicySetDefinitionPolicyDefinitionReferenceArray{ PolicySetDefinitionPolicyDefinitionReferenceArgs{...} } type PolicySetDefinitionPolicyDefinitionReferenceArrayInput interface { pulumi.Input ToPolicySetDefinitionPolicyDefinitionReferenceArrayOutput() PolicySetDefinitionPolicyDefinitionReferenceArrayOutput ToPolicySetDefinitionPolicyDefinitionReferenceArrayOutputWithContext(context.Context) PolicySetDefinitionPolicyDefinitionReferenceArrayOutput } type PolicySetDefinitionPolicyDefinitionReferenceArray []PolicySetDefinitionPolicyDefinitionReferenceInput func (PolicySetDefinitionPolicyDefinitionReferenceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]PolicySetDefinitionPolicyDefinitionReference)(nil)).Elem() } func (i PolicySetDefinitionPolicyDefinitionReferenceArray) ToPolicySetDefinitionPolicyDefinitionReferenceArrayOutput() PolicySetDefinitionPolicyDefinitionReferenceArrayOutput { return i.ToPolicySetDefinitionPolicyDefinitionReferenceArrayOutputWithContext(context.Background()) } func (i PolicySetDefinitionPolicyDefinitionReferenceArray) ToPolicySetDefinitionPolicyDefinitionReferenceArrayOutputWithContext(ctx context.Context) PolicySetDefinitionPolicyDefinitionReferenceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicySetDefinitionPolicyDefinitionReferenceArrayOutput) } type PolicySetDefinitionPolicyDefinitionReferenceOutput struct{ *pulumi.OutputState } func (PolicySetDefinitionPolicyDefinitionReferenceOutput) ElementType() reflect.Type { return reflect.TypeOf((*PolicySetDefinitionPolicyDefinitionReference)(nil)).Elem() } func (o PolicySetDefinitionPolicyDefinitionReferenceOutput) ToPolicySetDefinitionPolicyDefinitionReferenceOutput() PolicySetDefinitionPolicyDefinitionReferenceOutput { return o } func (o PolicySetDefinitionPolicyDefinitionReferenceOutput) ToPolicySetDefinitionPolicyDefinitionReferenceOutputWithContext(ctx context.Context) PolicySetDefinitionPolicyDefinitionReferenceOutput { return o } // Parameter values for the references Policy Definition in JSON format. func (o PolicySetDefinitionPolicyDefinitionReferenceOutput) ParameterValues() pulumi.StringPtrOutput { return o.ApplyT(func(v PolicySetDefinitionPolicyDefinitionReference) *string { return v.ParameterValues }).(pulumi.StringPtrOutput) } // The ID of the Policy Definition to include in this Policy Set Definition. func (o PolicySetDefinitionPolicyDefinitionReferenceOutput) PolicyDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v PolicySetDefinitionPolicyDefinitionReference) string { return v.PolicyDefinitionId }).(pulumi.StringOutput) } // Specifies a list of Policy Definition Groups names that this Policy Definition Reference belongs to. func (o PolicySetDefinitionPolicyDefinitionReferenceOutput) PolicyGroupNames() pulumi.StringArrayOutput { return o.ApplyT(func(v PolicySetDefinitionPolicyDefinitionReference) []string { return v.PolicyGroupNames }).(pulumi.StringArrayOutput) } // A unique ID within this Policy Set Definition for this Policy Definition Reference. func (o PolicySetDefinitionPolicyDefinitionReferenceOutput) ReferenceId() pulumi.StringPtrOutput { return o.ApplyT(func(v PolicySetDefinitionPolicyDefinitionReference) *string { return v.ReferenceId }).(pulumi.StringPtrOutput) } // The version of the Policy Definition to use. func (o PolicySetDefinitionPolicyDefinitionReferenceOutput) Version() pulumi.StringPtrOutput { return o.ApplyT(func(v PolicySetDefinitionPolicyDefinitionReference) *string { return v.Version }).(pulumi.StringPtrOutput) } type PolicySetDefinitionPolicyDefinitionReferenceArrayOutput struct{ *pulumi.OutputState } func (PolicySetDefinitionPolicyDefinitionReferenceArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]PolicySetDefinitionPolicyDefinitionReference)(nil)).Elem() } func (o PolicySetDefinitionPolicyDefinitionReferenceArrayOutput) ToPolicySetDefinitionPolicyDefinitionReferenceArrayOutput() PolicySetDefinitionPolicyDefinitionReferenceArrayOutput { return o } func (o PolicySetDefinitionPolicyDefinitionReferenceArrayOutput) ToPolicySetDefinitionPolicyDefinitionReferenceArrayOutputWithContext(ctx context.Context) PolicySetDefinitionPolicyDefinitionReferenceArrayOutput { return o } func (o PolicySetDefinitionPolicyDefinitionReferenceArrayOutput) Index(i pulumi.IntInput) PolicySetDefinitionPolicyDefinitionReferenceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) PolicySetDefinitionPolicyDefinitionReference { return vs[0].([]PolicySetDefinitionPolicyDefinitionReference)[vs[1].(int)] }).(PolicySetDefinitionPolicyDefinitionReferenceOutput) } type VirtualMachineConfigurationAssignmentConfiguration struct { // The assignment type for the Guest Configuration Assignment. Possible values are `Audit`, `ApplyAndAutoCorrect`, `ApplyAndMonitor` and `DeployAndAutoCorrect`. AssignmentType *string `pulumi:"assignmentType"` // The content hash for the Guest Configuration package. // // > **Note:** The value for `contentHash` should be the SH256SUM for the zip file in the `contentUri` and must be in upper case. ContentHash *string `pulumi:"contentHash"` // The content URI where the Guest Configuration package is stored. // // > **Note:** When deploying a Custom Guest Configuration package the `contentHash` and `contentUri` fields must be defined. For Built-in Guest Configuration packages, such as the `AzureWindowsBaseline` package, the `contentHash` and `contentUri` should not be defined, rather these fields will be returned after the Built-in Guest Configuration package has been provisioned. For more information on guest configuration assignments please see the [product documentation](https://docs.microsoft.com/azure/governance/policy/concepts/guest-configuration-assignments). ContentUri *string `pulumi:"contentUri"` // One or more `parameter` blocks as defined below which define what configuration parameters and values against. Parameters []VirtualMachineConfigurationAssignmentConfigurationParameter `pulumi:"parameters"` // The version of the Guest Configuration that will be assigned in this Guest Configuration Assignment. Version *string `pulumi:"version"` } // VirtualMachineConfigurationAssignmentConfigurationInput is an input type that accepts VirtualMachineConfigurationAssignmentConfigurationArgs and VirtualMachineConfigurationAssignmentConfigurationOutput values. // You can construct a concrete instance of `VirtualMachineConfigurationAssignmentConfigurationInput` via: // // VirtualMachineConfigurationAssignmentConfigurationArgs{...} type VirtualMachineConfigurationAssignmentConfigurationInput interface { pulumi.Input ToVirtualMachineConfigurationAssignmentConfigurationOutput() VirtualMachineConfigurationAssignmentConfigurationOutput ToVirtualMachineConfigurationAssignmentConfigurationOutputWithContext(context.Context) VirtualMachineConfigurationAssignmentConfigurationOutput } type VirtualMachineConfigurationAssignmentConfigurationArgs struct { // The assignment type for the Guest Configuration Assignment. Possible values are `Audit`, `ApplyAndAutoCorrect`, `ApplyAndMonitor` and `DeployAndAutoCorrect`. AssignmentType pulumi.StringPtrInput `pulumi:"assignmentType"` // The content hash for the Guest Configuration package. // // > **Note:** The value for `contentHash` should be the SH256SUM for the zip file in the `contentUri` and must be in upper case. ContentHash pulumi.StringPtrInput `pulumi:"contentHash"` // The content URI where the Guest Configuration package is stored. // // > **Note:** When deploying a Custom Guest Configuration package the `contentHash` and `contentUri` fields must be defined. For Built-in Guest Configuration packages, such as the `AzureWindowsBaseline` package, the `contentHash` and `contentUri` should not be defined, rather these fields will be returned after the Built-in Guest Configuration package has been provisioned. For more information on guest configuration assignments please see the [product documentation](https://docs.microsoft.com/azure/governance/policy/concepts/guest-configuration-assignments). ContentUri pulumi.StringPtrInput `pulumi:"contentUri"` // One or more `parameter` blocks as defined below which define what configuration parameters and values against. Parameters VirtualMachineConfigurationAssignmentConfigurationParameterArrayInput `pulumi:"parameters"` // The version of the Guest Configuration that will be assigned in this Guest Configuration Assignment. Version pulumi.StringPtrInput `pulumi:"version"` } func (VirtualMachineConfigurationAssignmentConfigurationArgs) ElementType() reflect.Type { return reflect.TypeOf((*VirtualMachineConfigurationAssignmentConfiguration)(nil)).Elem() } func (i VirtualMachineConfigurationAssignmentConfigurationArgs) ToVirtualMachineConfigurationAssignmentConfigurationOutput() VirtualMachineConfigurationAssignmentConfigurationOutput { return i.ToVirtualMachineConfigurationAssignmentConfigurationOutputWithContext(context.Background()) } func (i VirtualMachineConfigurationAssignmentConfigurationArgs) ToVirtualMachineConfigurationAssignmentConfigurationOutputWithContext(ctx context.Context) VirtualMachineConfigurationAssignmentConfigurationOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineConfigurationAssignmentConfigurationOutput) } func (i VirtualMachineConfigurationAssignmentConfigurationArgs) ToVirtualMachineConfigurationAssignmentConfigurationPtrOutput() VirtualMachineConfigurationAssignmentConfigurationPtrOutput { return i.ToVirtualMachineConfigurationAssignmentConfigurationPtrOutputWithContext(context.Background()) } func (i VirtualMachineConfigurationAssignmentConfigurationArgs) ToVirtualMachineConfigurationAssignmentConfigurationPtrOutputWithContext(ctx context.Context) VirtualMachineConfigurationAssignmentConfigurationPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineConfigurationAssignmentConfigurationOutput).ToVirtualMachineConfigurationAssignmentConfigurationPtrOutputWithContext(ctx) } // VirtualMachineConfigurationAssignmentConfigurationPtrInput is an input type that accepts VirtualMachineConfigurationAssignmentConfigurationArgs, VirtualMachineConfigurationAssignmentConfigurationPtr and VirtualMachineConfigurationAssignmentConfigurationPtrOutput values. // You can construct a concrete instance of `VirtualMachineConfigurationAssignmentConfigurationPtrInput` via: // // VirtualMachineConfigurationAssignmentConfigurationArgs{...} // // or: // // nil type VirtualMachineConfigurationAssignmentConfigurationPtrInput interface { pulumi.Input ToVirtualMachineConfigurationAssignmentConfigurationPtrOutput() VirtualMachineConfigurationAssignmentConfigurationPtrOutput ToVirtualMachineConfigurationAssignmentConfigurationPtrOutputWithContext(context.Context) VirtualMachineConfigurationAssignmentConfigurationPtrOutput } type virtualMachineConfigurationAssignmentConfigurationPtrType VirtualMachineConfigurationAssignmentConfigurationArgs func VirtualMachineConfigurationAssignmentConfigurationPtr(v *VirtualMachineConfigurationAssignmentConfigurationArgs) VirtualMachineConfigurationAssignmentConfigurationPtrInput { return (*virtualMachineConfigurationAssignmentConfigurationPtrType)(v) } func (*virtualMachineConfigurationAssignmentConfigurationPtrType) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineConfigurationAssignmentConfiguration)(nil)).Elem() } func (i *virtualMachineConfigurationAssignmentConfigurationPtrType) ToVirtualMachineConfigurationAssignmentConfigurationPtrOutput() VirtualMachineConfigurationAssignmentConfigurationPtrOutput { return i.ToVirtualMachineConfigurationAssignmentConfigurationPtrOutputWithContext(context.Background()) } func (i *virtualMachineConfigurationAssignmentConfigurationPtrType) ToVirtualMachineConfigurationAssignmentConfigurationPtrOutputWithContext(ctx context.Context) VirtualMachineConfigurationAssignmentConfigurationPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineConfigurationAssignmentConfigurationPtrOutput) } type VirtualMachineConfigurationAssignmentConfigurationOutput struct{ *pulumi.OutputState } func (VirtualMachineConfigurationAssignmentConfigurationOutput) ElementType() reflect.Type { return reflect.TypeOf((*VirtualMachineConfigurationAssignmentConfiguration)(nil)).Elem() } func (o VirtualMachineConfigurationAssignmentConfigurationOutput) ToVirtualMachineConfigurationAssignmentConfigurationOutput() VirtualMachineConfigurationAssignmentConfigurationOutput { return o } func (o VirtualMachineConfigurationAssignmentConfigurationOutput) ToVirtualMachineConfigurationAssignmentConfigurationOutputWithContext(ctx context.Context) VirtualMachineConfigurationAssignmentConfigurationOutput { return o } func (o VirtualMachineConfigurationAssignmentConfigurationOutput) ToVirtualMachineConfigurationAssignmentConfigurationPtrOutput() VirtualMachineConfigurationAssignmentConfigurationPtrOutput { return o.ToVirtualMachineConfigurationAssignmentConfigurationPtrOutputWithContext(context.Background()) } func (o VirtualMachineConfigurationAssignmentConfigurationOutput) ToVirtualMachineConfigurationAssignmentConfigurationPtrOutputWithContext(ctx context.Context) VirtualMachineConfigurationAssignmentConfigurationPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v VirtualMachineConfigurationAssignmentConfiguration) *VirtualMachineConfigurationAssignmentConfiguration { return &v }).(VirtualMachineConfigurationAssignmentConfigurationPtrOutput) } // The assignment type for the Guest Configuration Assignment. Possible values are `Audit`, `ApplyAndAutoCorrect`, `ApplyAndMonitor` and `DeployAndAutoCorrect`. func (o VirtualMachineConfigurationAssignmentConfigurationOutput) AssignmentType() pulumi.StringPtrOutput { return o.ApplyT(func(v VirtualMachineConfigurationAssignmentConfiguration) *string { return v.AssignmentType }).(pulumi.StringPtrOutput) } // The content hash for the Guest Configuration package. // // > **Note:** The value for `contentHash` should be the SH256SUM for the zip file in the `contentUri` and must be in upper case. func (o VirtualMachineConfigurationAssignmentConfigurationOutput) ContentHash() pulumi.StringPtrOutput { return o.ApplyT(func(v VirtualMachineConfigurationAssignmentConfiguration) *string { return v.ContentHash }).(pulumi.StringPtrOutput) } // The content URI where the Guest Configuration package is stored. // // > **Note:** When deploying a Custom Guest Configuration package the `contentHash` and `contentUri` fields must be defined. For Built-in Guest Configuration packages, such as the `AzureWindowsBaseline` package, the `contentHash` and `contentUri` should not be defined, rather these fields will be returned after the Built-in Guest Configuration package has been provisioned. For more information on guest configuration assignments please see the [product documentation](https://docs.microsoft.com/azure/governance/policy/concepts/guest-configuration-assignments). func (o VirtualMachineConfigurationAssignmentConfigurationOutput) ContentUri() pulumi.StringPtrOutput { return o.ApplyT(func(v VirtualMachineConfigurationAssignmentConfiguration) *string { return v.ContentUri }).(pulumi.StringPtrOutput) } // One or more `parameter` blocks as defined below which define what configuration parameters and values against. func (o VirtualMachineConfigurationAssignmentConfigurationOutput) Parameters() VirtualMachineConfigurationAssignmentConfigurationParameterArrayOutput { return o.ApplyT(func(v VirtualMachineConfigurationAssignmentConfiguration) []VirtualMachineConfigurationAssignmentConfigurationParameter { return v.Parameters }).(VirtualMachineConfigurationAssignmentConfigurationParameterArrayOutput) } // The version of the Guest Configuration that will be assigned in this Guest Configuration Assignment. func (o VirtualMachineConfigurationAssignmentConfigurationOutput) Version() pulumi.StringPtrOutput { return o.ApplyT(func(v VirtualMachineConfigurationAssignmentConfiguration) *string { return v.Version }).(pulumi.StringPtrOutput) } type VirtualMachineConfigurationAssignmentConfigurationPtrOutput struct{ *pulumi.OutputState } func (VirtualMachineConfigurationAssignmentConfigurationPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineConfigurationAssignmentConfiguration)(nil)).Elem() } func (o VirtualMachineConfigurationAssignmentConfigurationPtrOutput) ToVirtualMachineConfigurationAssignmentConfigurationPtrOutput() VirtualMachineConfigurationAssignmentConfigurationPtrOutput { return o } func (o VirtualMachineConfigurationAssignmentConfigurationPtrOutput) ToVirtualMachineConfigurationAssignmentConfigurationPtrOutputWithContext(ctx context.Context) VirtualMachineConfigurationAssignmentConfigurationPtrOutput { return o } func (o VirtualMachineConfigurationAssignmentConfigurationPtrOutput) Elem() VirtualMachineConfigurationAssignmentConfigurationOutput { return o.ApplyT(func(v *VirtualMachineConfigurationAssignmentConfiguration) VirtualMachineConfigurationAssignmentConfiguration { if v != nil { return *v } var ret VirtualMachineConfigurationAssignmentConfiguration return ret }).(VirtualMachineConfigurationAssignmentConfigurationOutput) } // The assignment type for the Guest Configuration Assignment. Possible values are `Audit`, `ApplyAndAutoCorrect`, `ApplyAndMonitor` and `DeployAndAutoCorrect`. func (o VirtualMachineConfigurationAssignmentConfigurationPtrOutput) AssignmentType() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualMachineConfigurationAssignmentConfiguration) *string { if v == nil { return nil } return v.AssignmentType }).(pulumi.StringPtrOutput) } // The content hash for the Guest Configuration package. // // > **Note:** The value for `contentHash` should be the SH256SUM for the zip file in the `contentUri` and must be in upper case. func (o VirtualMachineConfigurationAssignmentConfigurationPtrOutput) ContentHash() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualMachineConfigurationAssignmentConfiguration) *string { if v == nil { return nil } return v.ContentHash }).(pulumi.StringPtrOutput) } // The content URI where the Guest Configuration package is stored. // // > **Note:** When deploying a Custom Guest Configuration package the `contentHash` and `contentUri` fields must be defined. For Built-in Guest Configuration packages, such as the `AzureWindowsBaseline` package, the `contentHash` and `contentUri` should not be defined, rather these fields will be returned after the Built-in Guest Configuration package has been provisioned. For more information on guest configuration assignments please see the [product documentation](https://docs.microsoft.com/azure/governance/policy/concepts/guest-configuration-assignments). func (o VirtualMachineConfigurationAssignmentConfigurationPtrOutput) ContentUri() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualMachineConfigurationAssignmentConfiguration) *string { if v == nil { return nil } return v.ContentUri }).(pulumi.StringPtrOutput) } // One or more `parameter` blocks as defined below which define what configuration parameters and values against. func (o VirtualMachineConfigurationAssignmentConfigurationPtrOutput) Parameters() VirtualMachineConfigurationAssignmentConfigurationParameterArrayOutput { return o.ApplyT(func(v *VirtualMachineConfigurationAssignmentConfiguration) []VirtualMachineConfigurationAssignmentConfigurationParameter { if v == nil { return nil } return v.Parameters }).(VirtualMachineConfigurationAssignmentConfigurationParameterArrayOutput) } // The version of the Guest Configuration that will be assigned in this Guest Configuration Assignment. func (o VirtualMachineConfigurationAssignmentConfigurationPtrOutput) Version() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualMachineConfigurationAssignmentConfiguration) *string { if v == nil { return nil } return v.Version }).(pulumi.StringPtrOutput) } type VirtualMachineConfigurationAssignmentConfigurationParameter struct { // The name of the configuration parameter to check. Name string `pulumi:"name"` // The value to check the configuration parameter with. Value string `pulumi:"value"` } // VirtualMachineConfigurationAssignmentConfigurationParameterInput is an input type that accepts VirtualMachineConfigurationAssignmentConfigurationParameterArgs and VirtualMachineConfigurationAssignmentConfigurationParameterOutput values. // You can construct a concrete instance of `VirtualMachineConfigurationAssignmentConfigurationParameterInput` via: // // VirtualMachineConfigurationAssignmentConfigurationParameterArgs{...} type VirtualMachineConfigurationAssignmentConfigurationParameterInput interface { pulumi.Input ToVirtualMachineConfigurationAssignmentConfigurationParameterOutput() VirtualMachineConfigurationAssignmentConfigurationParameterOutput ToVirtualMachineConfigurationAssignmentConfigurationParameterOutputWithContext(context.Context) VirtualMachineConfigurationAssignmentConfigurationParameterOutput } type VirtualMachineConfigurationAssignmentConfigurationParameterArgs struct { // The name of the configuration parameter to check. Name pulumi.StringInput `pulumi:"name"` // The value to check the configuration parameter with. Value pulumi.StringInput `pulumi:"value"` } func (VirtualMachineConfigurationAssignmentConfigurationParameterArgs) ElementType() reflect.Type { return reflect.TypeOf((*VirtualMachineConfigurationAssignmentConfigurationParameter)(nil)).Elem() } func (i VirtualMachineConfigurationAssignmentConfigurationParameterArgs) ToVirtualMachineConfigurationAssignmentConfigurationParameterOutput() VirtualMachineConfigurationAssignmentConfigurationParameterOutput { return i.ToVirtualMachineConfigurationAssignmentConfigurationParameterOutputWithContext(context.Background()) }
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/policy/virtualMachineConfigurationAssignment.go
sdk/go/azure/policy/virtualMachineConfigurationAssignment.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 policy import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Applies a Guest Configuration Policy to a Virtual Machine. // // > **Note:** You can create Guest Configuration Policies without defining a `compute.Extension` resource, however the policies will not be executed until a `compute.Extension` has been provisioned to the virtual machine. // // ## 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/policy" // "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-gca"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vnet"), // 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("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"), // ResourceGroupName: example.Name, // Location: example.Location, // IpConfigurations: network.NetworkInterfaceIpConfigurationArray{ // &network.NetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("internal"), // SubnetId: exampleSubnet.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // }, // }, // }) // if err != nil { // return err // } // exampleWindowsVirtualMachine, err := compute.NewWindowsVirtualMachine(ctx, "example", &compute.WindowsVirtualMachineArgs{ // Name: pulumi.String("examplevm"), // ResourceGroupName: example.Name, // Location: example.Location, // Size: pulumi.String("Standard_F2"), // AdminUsername: pulumi.String("adminuser"), // AdminPassword: pulumi.String("P@$$w0rd1234!"), // NetworkInterfaceIds: pulumi.StringArray{ // exampleNetworkInterface.ID(), // }, // Identity: &compute.WindowsVirtualMachineIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // OsDisk: &compute.WindowsVirtualMachineOsDiskArgs{ // Caching: pulumi.String("ReadWrite"), // StorageAccountType: pulumi.String("Standard_LRS"), // }, // SourceImageReference: &compute.WindowsVirtualMachineSourceImageReferenceArgs{ // Publisher: pulumi.String("MicrosoftWindowsServer"), // Offer: pulumi.String("WindowsServer"), // Sku: pulumi.String("2019-Datacenter"), // Version: pulumi.String("latest"), // }, // }) // if err != nil { // return err // } // _, err = compute.NewExtension(ctx, "example", &compute.ExtensionArgs{ // Name: pulumi.String("AzurePolicyforWindows"), // VirtualMachineId: exampleWindowsVirtualMachine.ID(), // Publisher: pulumi.String("Microsoft.GuestConfiguration"), // Type: pulumi.String("ConfigurationforWindows"), // TypeHandlerVersion: pulumi.String("1.29"), // AutoUpgradeMinorVersion: pulumi.Bool(true), // }) // if err != nil { // return err // } // _, err = policy.NewVirtualMachineConfigurationAssignment(ctx, "example", &policy.VirtualMachineConfigurationAssignmentArgs{ // Name: pulumi.String("AzureWindowsBaseline"), // Location: exampleWindowsVirtualMachine.Location, // VirtualMachineId: exampleWindowsVirtualMachine.ID(), // Configuration: &policy.VirtualMachineConfigurationAssignmentConfigurationArgs{ // AssignmentType: pulumi.String("ApplyAndMonitor"), // Version: pulumi.String("1.*"), // Parameters: policy.VirtualMachineConfigurationAssignmentConfigurationParameterArray{ // &policy.VirtualMachineConfigurationAssignmentConfigurationParameterArgs{ // Name: pulumi.String("Minimum Password Length;ExpectedValue"), // Value: pulumi.String("16"), // }, // &policy.VirtualMachineConfigurationAssignmentConfigurationParameterArgs{ // Name: pulumi.String("Minimum Password Age;ExpectedValue"), // Value: pulumi.String("0"), // }, // &policy.VirtualMachineConfigurationAssignmentConfigurationParameterArgs{ // Name: pulumi.String("Maximum Password Age;ExpectedValue"), // Value: pulumi.String("30,45"), // }, // &policy.VirtualMachineConfigurationAssignmentConfigurationParameterArgs{ // Name: pulumi.String("Enforce Password History;ExpectedValue"), // Value: pulumi.String("10"), // }, // &policy.VirtualMachineConfigurationAssignmentConfigurationParameterArgs{ // Name: pulumi.String("Password Must Meet Complexity Requirements;ExpectedValue"), // Value: pulumi.String("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.Compute` - 2024-04-05 // // ## Import // // Policy Virtual Machine Configuration Assignments can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:policy/virtualMachineConfigurationAssignment:VirtualMachineConfigurationAssignment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/assignment1 // ``` type VirtualMachineConfigurationAssignment struct { pulumi.CustomResourceState // A `configuration` block as defined below. Configuration VirtualMachineConfigurationAssignmentConfigurationOutput `pulumi:"configuration"` // The Azure location where the Policy Virtual Machine Configuration Assignment should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the Guest Configuration that will be assigned in this Guest Configuration Assignment. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The resource ID of the Policy Virtual Machine which this Guest Configuration Assignment should apply to. Changing this forces a new resource to be created. VirtualMachineId pulumi.StringOutput `pulumi:"virtualMachineId"` } // NewVirtualMachineConfigurationAssignment registers a new resource with the given unique name, arguments, and options. func NewVirtualMachineConfigurationAssignment(ctx *pulumi.Context, name string, args *VirtualMachineConfigurationAssignmentArgs, opts ...pulumi.ResourceOption) (*VirtualMachineConfigurationAssignment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Configuration == nil { return nil, errors.New("invalid value for required argument 'Configuration'") } if args.VirtualMachineId == nil { return nil, errors.New("invalid value for required argument 'VirtualMachineId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VirtualMachineConfigurationAssignment err := ctx.RegisterResource("azure:policy/virtualMachineConfigurationAssignment:VirtualMachineConfigurationAssignment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualMachineConfigurationAssignment gets an existing VirtualMachineConfigurationAssignment 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 GetVirtualMachineConfigurationAssignment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualMachineConfigurationAssignmentState, opts ...pulumi.ResourceOption) (*VirtualMachineConfigurationAssignment, error) { var resource VirtualMachineConfigurationAssignment err := ctx.ReadResource("azure:policy/virtualMachineConfigurationAssignment:VirtualMachineConfigurationAssignment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualMachineConfigurationAssignment resources. type virtualMachineConfigurationAssignmentState struct { // A `configuration` block as defined below. Configuration *VirtualMachineConfigurationAssignmentConfiguration `pulumi:"configuration"` // The Azure location where the Policy Virtual Machine Configuration Assignment should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Guest Configuration that will be assigned in this Guest Configuration Assignment. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The resource ID of the Policy Virtual Machine which this Guest Configuration Assignment should apply to. Changing this forces a new resource to be created. VirtualMachineId *string `pulumi:"virtualMachineId"` } type VirtualMachineConfigurationAssignmentState struct { // A `configuration` block as defined below. Configuration VirtualMachineConfigurationAssignmentConfigurationPtrInput // The Azure location where the Policy Virtual Machine Configuration Assignment should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Guest Configuration that will be assigned in this Guest Configuration Assignment. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The resource ID of the Policy Virtual Machine which this Guest Configuration Assignment should apply to. Changing this forces a new resource to be created. VirtualMachineId pulumi.StringPtrInput } func (VirtualMachineConfigurationAssignmentState) ElementType() reflect.Type { return reflect.TypeOf((*virtualMachineConfigurationAssignmentState)(nil)).Elem() } type virtualMachineConfigurationAssignmentArgs struct { // A `configuration` block as defined below. Configuration VirtualMachineConfigurationAssignmentConfiguration `pulumi:"configuration"` // The Azure location where the Policy Virtual Machine Configuration Assignment should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Guest Configuration that will be assigned in this Guest Configuration Assignment. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The resource ID of the Policy Virtual Machine which this Guest Configuration Assignment should apply to. Changing this forces a new resource to be created. VirtualMachineId string `pulumi:"virtualMachineId"` } // The set of arguments for constructing a VirtualMachineConfigurationAssignment resource. type VirtualMachineConfigurationAssignmentArgs struct { // A `configuration` block as defined below. Configuration VirtualMachineConfigurationAssignmentConfigurationInput // The Azure location where the Policy Virtual Machine Configuration Assignment should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Guest Configuration that will be assigned in this Guest Configuration Assignment. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The resource ID of the Policy Virtual Machine which this Guest Configuration Assignment should apply to. Changing this forces a new resource to be created. VirtualMachineId pulumi.StringInput } func (VirtualMachineConfigurationAssignmentArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualMachineConfigurationAssignmentArgs)(nil)).Elem() } type VirtualMachineConfigurationAssignmentInput interface { pulumi.Input ToVirtualMachineConfigurationAssignmentOutput() VirtualMachineConfigurationAssignmentOutput ToVirtualMachineConfigurationAssignmentOutputWithContext(ctx context.Context) VirtualMachineConfigurationAssignmentOutput } func (*VirtualMachineConfigurationAssignment) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineConfigurationAssignment)(nil)).Elem() } func (i *VirtualMachineConfigurationAssignment) ToVirtualMachineConfigurationAssignmentOutput() VirtualMachineConfigurationAssignmentOutput { return i.ToVirtualMachineConfigurationAssignmentOutputWithContext(context.Background()) } func (i *VirtualMachineConfigurationAssignment) ToVirtualMachineConfigurationAssignmentOutputWithContext(ctx context.Context) VirtualMachineConfigurationAssignmentOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineConfigurationAssignmentOutput) } // VirtualMachineConfigurationAssignmentArrayInput is an input type that accepts VirtualMachineConfigurationAssignmentArray and VirtualMachineConfigurationAssignmentArrayOutput values. // You can construct a concrete instance of `VirtualMachineConfigurationAssignmentArrayInput` via: // // VirtualMachineConfigurationAssignmentArray{ VirtualMachineConfigurationAssignmentArgs{...} } type VirtualMachineConfigurationAssignmentArrayInput interface { pulumi.Input ToVirtualMachineConfigurationAssignmentArrayOutput() VirtualMachineConfigurationAssignmentArrayOutput ToVirtualMachineConfigurationAssignmentArrayOutputWithContext(context.Context) VirtualMachineConfigurationAssignmentArrayOutput } type VirtualMachineConfigurationAssignmentArray []VirtualMachineConfigurationAssignmentInput func (VirtualMachineConfigurationAssignmentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualMachineConfigurationAssignment)(nil)).Elem() } func (i VirtualMachineConfigurationAssignmentArray) ToVirtualMachineConfigurationAssignmentArrayOutput() VirtualMachineConfigurationAssignmentArrayOutput { return i.ToVirtualMachineConfigurationAssignmentArrayOutputWithContext(context.Background()) } func (i VirtualMachineConfigurationAssignmentArray) ToVirtualMachineConfigurationAssignmentArrayOutputWithContext(ctx context.Context) VirtualMachineConfigurationAssignmentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineConfigurationAssignmentArrayOutput) } // VirtualMachineConfigurationAssignmentMapInput is an input type that accepts VirtualMachineConfigurationAssignmentMap and VirtualMachineConfigurationAssignmentMapOutput values. // You can construct a concrete instance of `VirtualMachineConfigurationAssignmentMapInput` via: // // VirtualMachineConfigurationAssignmentMap{ "key": VirtualMachineConfigurationAssignmentArgs{...} } type VirtualMachineConfigurationAssignmentMapInput interface { pulumi.Input ToVirtualMachineConfigurationAssignmentMapOutput() VirtualMachineConfigurationAssignmentMapOutput ToVirtualMachineConfigurationAssignmentMapOutputWithContext(context.Context) VirtualMachineConfigurationAssignmentMapOutput } type VirtualMachineConfigurationAssignmentMap map[string]VirtualMachineConfigurationAssignmentInput func (VirtualMachineConfigurationAssignmentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualMachineConfigurationAssignment)(nil)).Elem() } func (i VirtualMachineConfigurationAssignmentMap) ToVirtualMachineConfigurationAssignmentMapOutput() VirtualMachineConfigurationAssignmentMapOutput { return i.ToVirtualMachineConfigurationAssignmentMapOutputWithContext(context.Background()) } func (i VirtualMachineConfigurationAssignmentMap) ToVirtualMachineConfigurationAssignmentMapOutputWithContext(ctx context.Context) VirtualMachineConfigurationAssignmentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineConfigurationAssignmentMapOutput) } type VirtualMachineConfigurationAssignmentOutput struct{ *pulumi.OutputState } func (VirtualMachineConfigurationAssignmentOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineConfigurationAssignment)(nil)).Elem() } func (o VirtualMachineConfigurationAssignmentOutput) ToVirtualMachineConfigurationAssignmentOutput() VirtualMachineConfigurationAssignmentOutput { return o } func (o VirtualMachineConfigurationAssignmentOutput) ToVirtualMachineConfigurationAssignmentOutputWithContext(ctx context.Context) VirtualMachineConfigurationAssignmentOutput { return o } // A `configuration` block as defined below. func (o VirtualMachineConfigurationAssignmentOutput) Configuration() VirtualMachineConfigurationAssignmentConfigurationOutput { return o.ApplyT(func(v *VirtualMachineConfigurationAssignment) VirtualMachineConfigurationAssignmentConfigurationOutput { return v.Configuration }).(VirtualMachineConfigurationAssignmentConfigurationOutput) } // The Azure location where the Policy Virtual Machine Configuration Assignment should exist. Changing this forces a new resource to be created. func (o VirtualMachineConfigurationAssignmentOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineConfigurationAssignment) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the Guest Configuration that will be assigned in this Guest Configuration Assignment. Changing this forces a new resource to be created. func (o VirtualMachineConfigurationAssignmentOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineConfigurationAssignment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The resource ID of the Policy Virtual Machine which this Guest Configuration Assignment should apply to. Changing this forces a new resource to be created. func (o VirtualMachineConfigurationAssignmentOutput) VirtualMachineId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineConfigurationAssignment) pulumi.StringOutput { return v.VirtualMachineId }).(pulumi.StringOutput) } type VirtualMachineConfigurationAssignmentArrayOutput struct{ *pulumi.OutputState } func (VirtualMachineConfigurationAssignmentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualMachineConfigurationAssignment)(nil)).Elem() } func (o VirtualMachineConfigurationAssignmentArrayOutput) ToVirtualMachineConfigurationAssignmentArrayOutput() VirtualMachineConfigurationAssignmentArrayOutput { return o } func (o VirtualMachineConfigurationAssignmentArrayOutput) ToVirtualMachineConfigurationAssignmentArrayOutputWithContext(ctx context.Context) VirtualMachineConfigurationAssignmentArrayOutput { return o } func (o VirtualMachineConfigurationAssignmentArrayOutput) Index(i pulumi.IntInput) VirtualMachineConfigurationAssignmentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualMachineConfigurationAssignment { return vs[0].([]*VirtualMachineConfigurationAssignment)[vs[1].(int)] }).(VirtualMachineConfigurationAssignmentOutput) } type VirtualMachineConfigurationAssignmentMapOutput struct{ *pulumi.OutputState } func (VirtualMachineConfigurationAssignmentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualMachineConfigurationAssignment)(nil)).Elem() } func (o VirtualMachineConfigurationAssignmentMapOutput) ToVirtualMachineConfigurationAssignmentMapOutput() VirtualMachineConfigurationAssignmentMapOutput { return o } func (o VirtualMachineConfigurationAssignmentMapOutput) ToVirtualMachineConfigurationAssignmentMapOutputWithContext(ctx context.Context) VirtualMachineConfigurationAssignmentMapOutput { return o } func (o VirtualMachineConfigurationAssignmentMapOutput) MapIndex(k pulumi.StringInput) VirtualMachineConfigurationAssignmentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualMachineConfigurationAssignment { return vs[0].(map[string]*VirtualMachineConfigurationAssignment)[vs[1].(string)] }).(VirtualMachineConfigurationAssignmentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineConfigurationAssignmentInput)(nil)).Elem(), &VirtualMachineConfigurationAssignment{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineConfigurationAssignmentArrayInput)(nil)).Elem(), VirtualMachineConfigurationAssignmentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineConfigurationAssignmentMapInput)(nil)).Elem(), VirtualMachineConfigurationAssignmentMap{}) pulumi.RegisterOutputType(VirtualMachineConfigurationAssignmentOutput{}) pulumi.RegisterOutputType(VirtualMachineConfigurationAssignmentArrayOutput{}) pulumi.RegisterOutputType(VirtualMachineConfigurationAssignmentMapOutput{}) }
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/policy/getPolicyDefintionBuiltIn.go
sdk/go/azure/policy/getPolicyDefintionBuiltIn.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 policy 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 Built-In Policy Definition. Retrieves Policy Definitions from your current subscription by default. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/policy" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := policy.GetPolicyDefintionBuiltIn(ctx, &policy.GetPolicyDefintionBuiltInArgs{ // DisplayName: pulumi.StringRef("Allowed resource types"), // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // return nil // }) // } // // ``` func GetPolicyDefintionBuiltIn(ctx *pulumi.Context, args *GetPolicyDefintionBuiltInArgs, opts ...pulumi.InvokeOption) (*GetPolicyDefintionBuiltInResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetPolicyDefintionBuiltInResult err := ctx.Invoke("azure:policy/getPolicyDefintionBuiltIn:getPolicyDefintionBuiltIn", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getPolicyDefintionBuiltIn. type GetPolicyDefintionBuiltInArgs struct { // Specifies the display name of the Policy Definition. Conflicts with `name`. // // > **Note:** As `displayName` is not unique errors may occur when there are multiple policy definitions with same display name. DisplayName *string `pulumi:"displayName"` // Only retrieve Policy Definitions from this Management Group. ManagementGroupName *string `pulumi:"managementGroupName"` // Specifies the name of the Policy Definition. Conflicts with `displayName`. Name *string `pulumi:"name"` } // A collection of values returned by getPolicyDefintionBuiltIn. type GetPolicyDefintionBuiltInResult struct { // The Description of the Policy. Description string `pulumi:"description"` DisplayName string `pulumi:"displayName"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` ManagementGroupName *string `pulumi:"managementGroupName"` // Any Metadata defined in the Policy. Metadata string `pulumi:"metadata"` // The Mode of the Policy. Mode string `pulumi:"mode"` Name string `pulumi:"name"` // Any Parameters defined in the Policy. Parameters string `pulumi:"parameters"` // The Rule as defined (in JSON) in the Policy. PolicyRule string `pulumi:"policyRule"` // The Type of the Policy. Possible values are `BuiltIn`, `Custom` and `NotSpecified`. PolicyType string `pulumi:"policyType"` // A list of role definition id extracted from `policyRule` required for remediation. RoleDefinitionIds []string `pulumi:"roleDefinitionIds"` // The Type of Policy. Type string `pulumi:"type"` } func GetPolicyDefintionBuiltInOutput(ctx *pulumi.Context, args GetPolicyDefintionBuiltInOutputArgs, opts ...pulumi.InvokeOption) GetPolicyDefintionBuiltInResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetPolicyDefintionBuiltInResultOutput, error) { args := v.(GetPolicyDefintionBuiltInArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:policy/getPolicyDefintionBuiltIn:getPolicyDefintionBuiltIn", args, GetPolicyDefintionBuiltInResultOutput{}, options).(GetPolicyDefintionBuiltInResultOutput), nil }).(GetPolicyDefintionBuiltInResultOutput) } // A collection of arguments for invoking getPolicyDefintionBuiltIn. type GetPolicyDefintionBuiltInOutputArgs struct { // Specifies the display name of the Policy Definition. Conflicts with `name`. // // > **Note:** As `displayName` is not unique errors may occur when there are multiple policy definitions with same display name. DisplayName pulumi.StringPtrInput `pulumi:"displayName"` // Only retrieve Policy Definitions from this Management Group. ManagementGroupName pulumi.StringPtrInput `pulumi:"managementGroupName"` // Specifies the name of the Policy Definition. Conflicts with `displayName`. Name pulumi.StringPtrInput `pulumi:"name"` } func (GetPolicyDefintionBuiltInOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetPolicyDefintionBuiltInArgs)(nil)).Elem() } // A collection of values returned by getPolicyDefintionBuiltIn. type GetPolicyDefintionBuiltInResultOutput struct{ *pulumi.OutputState } func (GetPolicyDefintionBuiltInResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetPolicyDefintionBuiltInResult)(nil)).Elem() } func (o GetPolicyDefintionBuiltInResultOutput) ToGetPolicyDefintionBuiltInResultOutput() GetPolicyDefintionBuiltInResultOutput { return o } func (o GetPolicyDefintionBuiltInResultOutput) ToGetPolicyDefintionBuiltInResultOutputWithContext(ctx context.Context) GetPolicyDefintionBuiltInResultOutput { return o } // The Description of the Policy. func (o GetPolicyDefintionBuiltInResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionBuiltInResult) string { return v.Description }).(pulumi.StringOutput) } func (o GetPolicyDefintionBuiltInResultOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionBuiltInResult) string { return v.DisplayName }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetPolicyDefintionBuiltInResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionBuiltInResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetPolicyDefintionBuiltInResultOutput) ManagementGroupName() pulumi.StringPtrOutput { return o.ApplyT(func(v GetPolicyDefintionBuiltInResult) *string { return v.ManagementGroupName }).(pulumi.StringPtrOutput) } // Any Metadata defined in the Policy. func (o GetPolicyDefintionBuiltInResultOutput) Metadata() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionBuiltInResult) string { return v.Metadata }).(pulumi.StringOutput) } // The Mode of the Policy. func (o GetPolicyDefintionBuiltInResultOutput) Mode() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionBuiltInResult) string { return v.Mode }).(pulumi.StringOutput) } func (o GetPolicyDefintionBuiltInResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionBuiltInResult) string { return v.Name }).(pulumi.StringOutput) } // Any Parameters defined in the Policy. func (o GetPolicyDefintionBuiltInResultOutput) Parameters() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionBuiltInResult) string { return v.Parameters }).(pulumi.StringOutput) } // The Rule as defined (in JSON) in the Policy. func (o GetPolicyDefintionBuiltInResultOutput) PolicyRule() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionBuiltInResult) string { return v.PolicyRule }).(pulumi.StringOutput) } // The Type of the Policy. Possible values are `BuiltIn`, `Custom` and `NotSpecified`. func (o GetPolicyDefintionBuiltInResultOutput) PolicyType() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionBuiltInResult) string { return v.PolicyType }).(pulumi.StringOutput) } // A list of role definition id extracted from `policyRule` required for remediation. func (o GetPolicyDefintionBuiltInResultOutput) RoleDefinitionIds() pulumi.StringArrayOutput { return o.ApplyT(func(v GetPolicyDefintionBuiltInResult) []string { return v.RoleDefinitionIds }).(pulumi.StringArrayOutput) } // The Type of Policy. func (o GetPolicyDefintionBuiltInResultOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyDefintionBuiltInResult) string { return v.Type }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetPolicyDefintionBuiltInResultOutput{}) }
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/policy/getVirtualMachineConfigurationAssignment.go
sdk/go/azure/policy/getVirtualMachineConfigurationAssignment.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 policy 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 Guest Configuration Policy. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/policy" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := policy.LookupVirtualMachineConfigurationAssignment(ctx, &policy.LookupVirtualMachineConfigurationAssignmentArgs{ // Name: "AzureWindowsBaseline", // ResourceGroupName: "example-RG", // VirtualMachineName: "example-vm", // }, nil) // if err != nil { // return err // } // ctx.Export("complianceStatus", example.ComplianceStatus) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Compute` - 2024-04-05 func LookupVirtualMachineConfigurationAssignment(ctx *pulumi.Context, args *LookupVirtualMachineConfigurationAssignmentArgs, opts ...pulumi.InvokeOption) (*LookupVirtualMachineConfigurationAssignmentResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupVirtualMachineConfigurationAssignmentResult err := ctx.Invoke("azure:policy/getVirtualMachineConfigurationAssignment:getVirtualMachineConfigurationAssignment", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getVirtualMachineConfigurationAssignment. type LookupVirtualMachineConfigurationAssignmentArgs struct { // Specifies the name of the Guest Configuration Assignment. Name string `pulumi:"name"` // Specifies the Name of the Resource Group where the Guest Configuration Assignment exists. ResourceGroupName string `pulumi:"resourceGroupName"` // Only retrieve Policy Set Definitions from this Management Group. VirtualMachineName string `pulumi:"virtualMachineName"` } // A collection of values returned by getVirtualMachineConfigurationAssignment. type LookupVirtualMachineConfigurationAssignmentResult struct { // Combined hash of the configuration package and parameters. AssignmentHash string `pulumi:"assignmentHash"` // A value indicating compliance status of the machine for the assigned guest configuration. Possible return values are `Compliant`, `NonCompliant` and `Pending`. ComplianceStatus string `pulumi:"complianceStatus"` // The content hash for the Guest Configuration package. ContentHash string `pulumi:"contentHash"` // The content URI where the Guest Configuration package is stored. ContentUri string `pulumi:"contentUri"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // Date and time, in RFC3339 format, when the machines compliance status was last checked. LastComplianceStatusChecked string `pulumi:"lastComplianceStatusChecked"` // The ID of the latest report for the guest configuration assignment. LatestReportId string `pulumi:"latestReportId"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` VirtualMachineName string `pulumi:"virtualMachineName"` } func LookupVirtualMachineConfigurationAssignmentOutput(ctx *pulumi.Context, args LookupVirtualMachineConfigurationAssignmentOutputArgs, opts ...pulumi.InvokeOption) LookupVirtualMachineConfigurationAssignmentResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupVirtualMachineConfigurationAssignmentResultOutput, error) { args := v.(LookupVirtualMachineConfigurationAssignmentArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:policy/getVirtualMachineConfigurationAssignment:getVirtualMachineConfigurationAssignment", args, LookupVirtualMachineConfigurationAssignmentResultOutput{}, options).(LookupVirtualMachineConfigurationAssignmentResultOutput), nil }).(LookupVirtualMachineConfigurationAssignmentResultOutput) } // A collection of arguments for invoking getVirtualMachineConfigurationAssignment. type LookupVirtualMachineConfigurationAssignmentOutputArgs struct { // Specifies the name of the Guest Configuration Assignment. Name pulumi.StringInput `pulumi:"name"` // Specifies the Name of the Resource Group where the Guest Configuration Assignment exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // Only retrieve Policy Set Definitions from this Management Group. VirtualMachineName pulumi.StringInput `pulumi:"virtualMachineName"` } func (LookupVirtualMachineConfigurationAssignmentOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupVirtualMachineConfigurationAssignmentArgs)(nil)).Elem() } // A collection of values returned by getVirtualMachineConfigurationAssignment. type LookupVirtualMachineConfigurationAssignmentResultOutput struct{ *pulumi.OutputState } func (LookupVirtualMachineConfigurationAssignmentResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupVirtualMachineConfigurationAssignmentResult)(nil)).Elem() } func (o LookupVirtualMachineConfigurationAssignmentResultOutput) ToLookupVirtualMachineConfigurationAssignmentResultOutput() LookupVirtualMachineConfigurationAssignmentResultOutput { return o } func (o LookupVirtualMachineConfigurationAssignmentResultOutput) ToLookupVirtualMachineConfigurationAssignmentResultOutputWithContext(ctx context.Context) LookupVirtualMachineConfigurationAssignmentResultOutput { return o } // Combined hash of the configuration package and parameters. func (o LookupVirtualMachineConfigurationAssignmentResultOutput) AssignmentHash() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualMachineConfigurationAssignmentResult) string { return v.AssignmentHash }).(pulumi.StringOutput) } // A value indicating compliance status of the machine for the assigned guest configuration. Possible return values are `Compliant`, `NonCompliant` and `Pending`. func (o LookupVirtualMachineConfigurationAssignmentResultOutput) ComplianceStatus() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualMachineConfigurationAssignmentResult) string { return v.ComplianceStatus }).(pulumi.StringOutput) } // The content hash for the Guest Configuration package. func (o LookupVirtualMachineConfigurationAssignmentResultOutput) ContentHash() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualMachineConfigurationAssignmentResult) string { return v.ContentHash }).(pulumi.StringOutput) } // The content URI where the Guest Configuration package is stored. func (o LookupVirtualMachineConfigurationAssignmentResultOutput) ContentUri() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualMachineConfigurationAssignmentResult) string { return v.ContentUri }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupVirtualMachineConfigurationAssignmentResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualMachineConfigurationAssignmentResult) string { return v.Id }).(pulumi.StringOutput) } // Date and time, in RFC3339 format, when the machines compliance status was last checked. func (o LookupVirtualMachineConfigurationAssignmentResultOutput) LastComplianceStatusChecked() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualMachineConfigurationAssignmentResult) string { return v.LastComplianceStatusChecked }).(pulumi.StringOutput) } // The ID of the latest report for the guest configuration assignment. func (o LookupVirtualMachineConfigurationAssignmentResultOutput) LatestReportId() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualMachineConfigurationAssignmentResult) string { return v.LatestReportId }).(pulumi.StringOutput) } func (o LookupVirtualMachineConfigurationAssignmentResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualMachineConfigurationAssignmentResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupVirtualMachineConfigurationAssignmentResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualMachineConfigurationAssignmentResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func (o LookupVirtualMachineConfigurationAssignmentResultOutput) VirtualMachineName() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualMachineConfigurationAssignmentResult) string { return v.VirtualMachineName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupVirtualMachineConfigurationAssignmentResultOutput{}) }
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/policy/getPolicySetDefinition.go
sdk/go/azure/policy/getPolicySetDefinition.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 policy 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 Policy Set Definition. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/policy" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := policy.LookupPolicySetDefinition(ctx, &policy.LookupPolicySetDefinitionArgs{ // DisplayName: pulumi.StringRef("Policy Set Definition Example"), // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // return nil // }) // } // // ``` func LookupPolicySetDefinition(ctx *pulumi.Context, args *LookupPolicySetDefinitionArgs, opts ...pulumi.InvokeOption) (*LookupPolicySetDefinitionResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupPolicySetDefinitionResult err := ctx.Invoke("azure:policy/getPolicySetDefinition:getPolicySetDefinition", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getPolicySetDefinition. type LookupPolicySetDefinitionArgs struct { // Specifies the display name of the Policy Set Definition. Conflicts with `name`. // // **NOTE** As `displayName` is not unique errors may occur when there are multiple policy set definitions with same display name. DisplayName *string `pulumi:"displayName"` // Only retrieve Policy Set Definitions from this Management Group. ManagementGroupName *string `pulumi:"managementGroupName"` // Specifies the name of the Policy Set Definition. Conflicts with `displayName`. Name *string `pulumi:"name"` } // A collection of values returned by getPolicySetDefinition. type LookupPolicySetDefinitionResult struct { // The description of this policy definition group. Description string `pulumi:"description"` // The display name of this policy definition group. DisplayName string `pulumi:"displayName"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` ManagementGroupName *string `pulumi:"managementGroupName"` // Any Metadata defined in the Policy Set Definition. Metadata string `pulumi:"metadata"` // The name of this policy definition group. Name string `pulumi:"name"` // The mapping of the parameter values for the referenced policy rule. The keys are the parameter names. Parameters string `pulumi:"parameters"` // One or more `policyDefinitionGroup` blocks as defined below. PolicyDefinitionGroups []GetPolicySetDefinitionPolicyDefinitionGroup `pulumi:"policyDefinitionGroups"` // One or more `policyDefinitionReference` blocks as defined below. PolicyDefinitionReferences []GetPolicySetDefinitionPolicyDefinitionReference `pulumi:"policyDefinitionReferences"` // The policy definitions contained within the policy set definition. PolicyDefinitions string `pulumi:"policyDefinitions"` // The Type of the Policy Set Definition. PolicyType string `pulumi:"policyType"` } func LookupPolicySetDefinitionOutput(ctx *pulumi.Context, args LookupPolicySetDefinitionOutputArgs, opts ...pulumi.InvokeOption) LookupPolicySetDefinitionResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupPolicySetDefinitionResultOutput, error) { args := v.(LookupPolicySetDefinitionArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:policy/getPolicySetDefinition:getPolicySetDefinition", args, LookupPolicySetDefinitionResultOutput{}, options).(LookupPolicySetDefinitionResultOutput), nil }).(LookupPolicySetDefinitionResultOutput) } // A collection of arguments for invoking getPolicySetDefinition. type LookupPolicySetDefinitionOutputArgs struct { // Specifies the display name of the Policy Set Definition. Conflicts with `name`. // // **NOTE** As `displayName` is not unique errors may occur when there are multiple policy set definitions with same display name. DisplayName pulumi.StringPtrInput `pulumi:"displayName"` // Only retrieve Policy Set Definitions from this Management Group. ManagementGroupName pulumi.StringPtrInput `pulumi:"managementGroupName"` // Specifies the name of the Policy Set Definition. Conflicts with `displayName`. Name pulumi.StringPtrInput `pulumi:"name"` } func (LookupPolicySetDefinitionOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupPolicySetDefinitionArgs)(nil)).Elem() } // A collection of values returned by getPolicySetDefinition. type LookupPolicySetDefinitionResultOutput struct{ *pulumi.OutputState } func (LookupPolicySetDefinitionResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupPolicySetDefinitionResult)(nil)).Elem() } func (o LookupPolicySetDefinitionResultOutput) ToLookupPolicySetDefinitionResultOutput() LookupPolicySetDefinitionResultOutput { return o } func (o LookupPolicySetDefinitionResultOutput) ToLookupPolicySetDefinitionResultOutputWithContext(ctx context.Context) LookupPolicySetDefinitionResultOutput { return o } // The description of this policy definition group. func (o LookupPolicySetDefinitionResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v LookupPolicySetDefinitionResult) string { return v.Description }).(pulumi.StringOutput) } // The display name of this policy definition group. func (o LookupPolicySetDefinitionResultOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v LookupPolicySetDefinitionResult) string { return v.DisplayName }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupPolicySetDefinitionResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupPolicySetDefinitionResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupPolicySetDefinitionResultOutput) ManagementGroupName() pulumi.StringPtrOutput { return o.ApplyT(func(v LookupPolicySetDefinitionResult) *string { return v.ManagementGroupName }).(pulumi.StringPtrOutput) } // Any Metadata defined in the Policy Set Definition. func (o LookupPolicySetDefinitionResultOutput) Metadata() pulumi.StringOutput { return o.ApplyT(func(v LookupPolicySetDefinitionResult) string { return v.Metadata }).(pulumi.StringOutput) } // The name of this policy definition group. func (o LookupPolicySetDefinitionResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupPolicySetDefinitionResult) string { return v.Name }).(pulumi.StringOutput) } // The mapping of the parameter values for the referenced policy rule. The keys are the parameter names. func (o LookupPolicySetDefinitionResultOutput) Parameters() pulumi.StringOutput { return o.ApplyT(func(v LookupPolicySetDefinitionResult) string { return v.Parameters }).(pulumi.StringOutput) } // One or more `policyDefinitionGroup` blocks as defined below. func (o LookupPolicySetDefinitionResultOutput) PolicyDefinitionGroups() GetPolicySetDefinitionPolicyDefinitionGroupArrayOutput { return o.ApplyT(func(v LookupPolicySetDefinitionResult) []GetPolicySetDefinitionPolicyDefinitionGroup { return v.PolicyDefinitionGroups }).(GetPolicySetDefinitionPolicyDefinitionGroupArrayOutput) } // One or more `policyDefinitionReference` blocks as defined below. func (o LookupPolicySetDefinitionResultOutput) PolicyDefinitionReferences() GetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput { return o.ApplyT(func(v LookupPolicySetDefinitionResult) []GetPolicySetDefinitionPolicyDefinitionReference { return v.PolicyDefinitionReferences }).(GetPolicySetDefinitionPolicyDefinitionReferenceArrayOutput) } // The policy definitions contained within the policy set definition. func (o LookupPolicySetDefinitionResultOutput) PolicyDefinitions() pulumi.StringOutput { return o.ApplyT(func(v LookupPolicySetDefinitionResult) string { return v.PolicyDefinitions }).(pulumi.StringOutput) } // The Type of the Policy Set Definition. func (o LookupPolicySetDefinitionResultOutput) PolicyType() pulumi.StringOutput { return o.ApplyT(func(v LookupPolicySetDefinitionResult) string { return v.PolicyType }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupPolicySetDefinitionResultOutput{}) }
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/policy/getPolicyAssignment.go
sdk/go/azure/policy/getPolicyAssignment.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 policy 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 Policy Assignment. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/policy" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := policy.GetPolicyAssignment(ctx, &policy.GetPolicyAssignmentArgs{ // Name: "existing", // ScopeId: exampleAzurermResourceGroup.Id, // }, 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.Authorization` - 2022-06-01 func GetPolicyAssignment(ctx *pulumi.Context, args *GetPolicyAssignmentArgs, opts ...pulumi.InvokeOption) (*GetPolicyAssignmentResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetPolicyAssignmentResult err := ctx.Invoke("azure:policy/getPolicyAssignment:getPolicyAssignment", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getPolicyAssignment. type GetPolicyAssignmentArgs struct { // The name of this Policy Assignment. Changing this forces a new Policy Assignment to be created. Name string `pulumi:"name"` // The ID of the scope this Policy Assignment is assigned to. The `scopeId` can be a subscription id, a resource group id, a management group id, or an ID of any resource that is assigned with a policy. Changing this forces a new Policy Assignment to be created. ScopeId string `pulumi:"scopeId"` } // A collection of values returned by getPolicyAssignment. type GetPolicyAssignmentResult struct { // The description of this Policy Assignment. Description string `pulumi:"description"` // The display name of this Policy Assignment. DisplayName string `pulumi:"displayName"` // Whether this Policy is enforced or not? Enforce bool `pulumi:"enforce"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // A `identity` block as defined below. Identities []GetPolicyAssignmentIdentity `pulumi:"identities"` // The Azure Region where the Policy Assignment exists. Location string `pulumi:"location"` // A JSON mapping of any Metadata for this Policy. Metadata string `pulumi:"metadata"` Name string `pulumi:"name"` // A `nonComplianceMessage` block as defined below. NonComplianceMessages []GetPolicyAssignmentNonComplianceMessage `pulumi:"nonComplianceMessages"` // A `notScopes` block as defined below. NotScopes []string `pulumi:"notScopes"` // A JSON mapping of any Parameters for this Policy. Parameters string `pulumi:"parameters"` // The ID of the assigned Policy Definition. PolicyDefinitionId string `pulumi:"policyDefinitionId"` ScopeId string `pulumi:"scopeId"` } func GetPolicyAssignmentOutput(ctx *pulumi.Context, args GetPolicyAssignmentOutputArgs, opts ...pulumi.InvokeOption) GetPolicyAssignmentResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetPolicyAssignmentResultOutput, error) { args := v.(GetPolicyAssignmentArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:policy/getPolicyAssignment:getPolicyAssignment", args, GetPolicyAssignmentResultOutput{}, options).(GetPolicyAssignmentResultOutput), nil }).(GetPolicyAssignmentResultOutput) } // A collection of arguments for invoking getPolicyAssignment. type GetPolicyAssignmentOutputArgs struct { // The name of this Policy Assignment. Changing this forces a new Policy Assignment to be created. Name pulumi.StringInput `pulumi:"name"` // The ID of the scope this Policy Assignment is assigned to. The `scopeId` can be a subscription id, a resource group id, a management group id, or an ID of any resource that is assigned with a policy. Changing this forces a new Policy Assignment to be created. ScopeId pulumi.StringInput `pulumi:"scopeId"` } func (GetPolicyAssignmentOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetPolicyAssignmentArgs)(nil)).Elem() } // A collection of values returned by getPolicyAssignment. type GetPolicyAssignmentResultOutput struct{ *pulumi.OutputState } func (GetPolicyAssignmentResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetPolicyAssignmentResult)(nil)).Elem() } func (o GetPolicyAssignmentResultOutput) ToGetPolicyAssignmentResultOutput() GetPolicyAssignmentResultOutput { return o } func (o GetPolicyAssignmentResultOutput) ToGetPolicyAssignmentResultOutputWithContext(ctx context.Context) GetPolicyAssignmentResultOutput { return o } // The description of this Policy Assignment. func (o GetPolicyAssignmentResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyAssignmentResult) string { return v.Description }).(pulumi.StringOutput) } // The display name of this Policy Assignment. func (o GetPolicyAssignmentResultOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyAssignmentResult) string { return v.DisplayName }).(pulumi.StringOutput) } // Whether this Policy is enforced or not? func (o GetPolicyAssignmentResultOutput) Enforce() pulumi.BoolOutput { return o.ApplyT(func(v GetPolicyAssignmentResult) bool { return v.Enforce }).(pulumi.BoolOutput) } // The provider-assigned unique ID for this managed resource. func (o GetPolicyAssignmentResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyAssignmentResult) string { return v.Id }).(pulumi.StringOutput) } // A `identity` block as defined below. func (o GetPolicyAssignmentResultOutput) Identities() GetPolicyAssignmentIdentityArrayOutput { return o.ApplyT(func(v GetPolicyAssignmentResult) []GetPolicyAssignmentIdentity { return v.Identities }).(GetPolicyAssignmentIdentityArrayOutput) } // The Azure Region where the Policy Assignment exists. func (o GetPolicyAssignmentResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyAssignmentResult) string { return v.Location }).(pulumi.StringOutput) } // A JSON mapping of any Metadata for this Policy. func (o GetPolicyAssignmentResultOutput) Metadata() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyAssignmentResult) string { return v.Metadata }).(pulumi.StringOutput) } func (o GetPolicyAssignmentResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyAssignmentResult) string { return v.Name }).(pulumi.StringOutput) } // A `nonComplianceMessage` block as defined below. func (o GetPolicyAssignmentResultOutput) NonComplianceMessages() GetPolicyAssignmentNonComplianceMessageArrayOutput { return o.ApplyT(func(v GetPolicyAssignmentResult) []GetPolicyAssignmentNonComplianceMessage { return v.NonComplianceMessages }).(GetPolicyAssignmentNonComplianceMessageArrayOutput) } // A `notScopes` block as defined below. func (o GetPolicyAssignmentResultOutput) NotScopes() pulumi.StringArrayOutput { return o.ApplyT(func(v GetPolicyAssignmentResult) []string { return v.NotScopes }).(pulumi.StringArrayOutput) } // A JSON mapping of any Parameters for this Policy. func (o GetPolicyAssignmentResultOutput) Parameters() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyAssignmentResult) string { return v.Parameters }).(pulumi.StringOutput) } // The ID of the assigned Policy Definition. func (o GetPolicyAssignmentResultOutput) PolicyDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyAssignmentResult) string { return v.PolicyDefinitionId }).(pulumi.StringOutput) } func (o GetPolicyAssignmentResultOutput) ScopeId() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyAssignmentResult) string { return v.ScopeId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetPolicyAssignmentResultOutput{}) }
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/policy/policySetDefinition.go
sdk/go/azure/policy/policySetDefinition.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 policy import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Policy Set Definition. // // > **Note:** Policy set definitions (also known as policy initiatives) do not take effect until they are assigned to a scope using a Policy Set Assignment. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/policy" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := policy.NewPolicySetDefinition(ctx, "example", &policy.PolicySetDefinitionArgs{ // Name: pulumi.String("example"), // PolicyType: pulumi.String("Custom"), // DisplayName: pulumi.String("Example"), // Parameters: pulumi.String(` { // \"allowedLocations\": { // \"type\": \"Array\", // \"metadata\": { // \"description\": \"The list of allowed locations for resources.\", // \"displayName\": \"Allowed locations\", // \"strongType\": \"location\" // } // } // } // // `), // // PolicyDefinitionReferences: policy.PolicySetDefinitionPolicyDefinitionReferenceArray{ // &policy.PolicySetDefinitionPolicyDefinitionReferenceArgs{ // Version: pulumi.String("1.0.*"), // PolicyDefinitionId: pulumi.String("/providers/Microsoft.Authorization/policyDefinitions/e765b5de-1225-4ba3-bd56-1ac6695af988"), // ParameterValues: pulumi.String(" {\n \\\"listOfAllowedLocations\\\": {\\\"value\\\": \\\"[parameters('allowedLocations')]\\\"}\n }\n"), // }, // }, // }) // 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.Authorization` - 2025-01-01 // // * `Microsoft.Management` - 2025-01-01 // // ## Import // // Policy Set Definitions can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:policy/policySetDefinition:PolicySetDefinition example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/policySetDefinitions/policySetDefinitionName // ``` type PolicySetDefinition struct { pulumi.CustomResourceState // The description of this Policy Set Definition. Description pulumi.StringPtrOutput `pulumi:"description"` // The display name of this Policy Set Definition. DisplayName pulumi.StringOutput `pulumi:"displayName"` // Deprecated: `managementGroupId` has been deprecated in favour of the `management.GroupPolicySetDefinition` resource and will be removed in v5.0 of the AzureRM Provider. ManagementGroupId pulumi.StringPtrOutput `pulumi:"managementGroupId"` // The metadata for the Policy Set Definition in JSON format. Metadata pulumi.StringOutput `pulumi:"metadata"` // The name which should be used for this Policy Set Definition. Changing this forces a new Policy Set Definition to be created. Name pulumi.StringOutput `pulumi:"name"` // The parameters for the Policy Set Definition in JSON format. Reducing the number of parameters forces a new resource to be created. Parameters pulumi.StringPtrOutput `pulumi:"parameters"` // One or more `policyDefinitionGroup` blocks as defined below. PolicyDefinitionGroups PolicySetDefinitionPolicyDefinitionGroupArrayOutput `pulumi:"policyDefinitionGroups"` // One or more `policyDefinitionReference` blocks as defined below. PolicyDefinitionReferences PolicySetDefinitionPolicyDefinitionReferenceArrayOutput `pulumi:"policyDefinitionReferences"` // The Policy Set Definition type. Possible values are `BuiltIn`, `Custom`, `NotSpecified`, and `Static`. Changing this forces a new Policy Set Definition to be created. PolicyType pulumi.StringOutput `pulumi:"policyType"` } // NewPolicySetDefinition registers a new resource with the given unique name, arguments, and options. func NewPolicySetDefinition(ctx *pulumi.Context, name string, args *PolicySetDefinitionArgs, opts ...pulumi.ResourceOption) (*PolicySetDefinition, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } if args.PolicyDefinitionReferences == nil { return nil, errors.New("invalid value for required argument 'PolicyDefinitionReferences'") } if args.PolicyType == nil { return nil, errors.New("invalid value for required argument 'PolicyType'") } opts = internal.PkgResourceDefaultOpts(opts) var resource PolicySetDefinition err := ctx.RegisterResource("azure:policy/policySetDefinition:PolicySetDefinition", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetPolicySetDefinition gets an existing PolicySetDefinition 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 GetPolicySetDefinition(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PolicySetDefinitionState, opts ...pulumi.ResourceOption) (*PolicySetDefinition, error) { var resource PolicySetDefinition err := ctx.ReadResource("azure:policy/policySetDefinition:PolicySetDefinition", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering PolicySetDefinition resources. type policySetDefinitionState struct { // The description of this Policy Set Definition. Description *string `pulumi:"description"` // The display name of this Policy Set Definition. DisplayName *string `pulumi:"displayName"` // Deprecated: `managementGroupId` has been deprecated in favour of the `management.GroupPolicySetDefinition` resource and will be removed in v5.0 of the AzureRM Provider. ManagementGroupId *string `pulumi:"managementGroupId"` // The metadata for the Policy Set Definition in JSON format. Metadata *string `pulumi:"metadata"` // The name which should be used for this Policy Set Definition. Changing this forces a new Policy Set Definition to be created. Name *string `pulumi:"name"` // The parameters for the Policy Set Definition in JSON format. Reducing the number of parameters forces a new resource to be created. Parameters *string `pulumi:"parameters"` // One or more `policyDefinitionGroup` blocks as defined below. PolicyDefinitionGroups []PolicySetDefinitionPolicyDefinitionGroup `pulumi:"policyDefinitionGroups"` // One or more `policyDefinitionReference` blocks as defined below. PolicyDefinitionReferences []PolicySetDefinitionPolicyDefinitionReference `pulumi:"policyDefinitionReferences"` // The Policy Set Definition type. Possible values are `BuiltIn`, `Custom`, `NotSpecified`, and `Static`. Changing this forces a new Policy Set Definition to be created. PolicyType *string `pulumi:"policyType"` } type PolicySetDefinitionState struct { // The description of this Policy Set Definition. Description pulumi.StringPtrInput // The display name of this Policy Set Definition. DisplayName pulumi.StringPtrInput // Deprecated: `managementGroupId` has been deprecated in favour of the `management.GroupPolicySetDefinition` resource and will be removed in v5.0 of the AzureRM Provider. ManagementGroupId pulumi.StringPtrInput // The metadata for the Policy Set Definition in JSON format. Metadata pulumi.StringPtrInput // The name which should be used for this Policy Set Definition. Changing this forces a new Policy Set Definition to be created. Name pulumi.StringPtrInput // The parameters for the Policy Set Definition in JSON format. Reducing the number of parameters forces a new resource to be created. Parameters pulumi.StringPtrInput // One or more `policyDefinitionGroup` blocks as defined below. PolicyDefinitionGroups PolicySetDefinitionPolicyDefinitionGroupArrayInput // One or more `policyDefinitionReference` blocks as defined below. PolicyDefinitionReferences PolicySetDefinitionPolicyDefinitionReferenceArrayInput // The Policy Set Definition type. Possible values are `BuiltIn`, `Custom`, `NotSpecified`, and `Static`. Changing this forces a new Policy Set Definition to be created. PolicyType pulumi.StringPtrInput } func (PolicySetDefinitionState) ElementType() reflect.Type { return reflect.TypeOf((*policySetDefinitionState)(nil)).Elem() } type policySetDefinitionArgs struct { // The description of this Policy Set Definition. Description *string `pulumi:"description"` // The display name of this Policy Set Definition. DisplayName string `pulumi:"displayName"` // Deprecated: `managementGroupId` has been deprecated in favour of the `management.GroupPolicySetDefinition` resource and will be removed in v5.0 of the AzureRM Provider. ManagementGroupId *string `pulumi:"managementGroupId"` // The metadata for the Policy Set Definition in JSON format. Metadata *string `pulumi:"metadata"` // The name which should be used for this Policy Set Definition. Changing this forces a new Policy Set Definition to be created. Name *string `pulumi:"name"` // The parameters for the Policy Set Definition in JSON format. Reducing the number of parameters forces a new resource to be created. Parameters *string `pulumi:"parameters"` // One or more `policyDefinitionGroup` blocks as defined below. PolicyDefinitionGroups []PolicySetDefinitionPolicyDefinitionGroup `pulumi:"policyDefinitionGroups"` // One or more `policyDefinitionReference` blocks as defined below. PolicyDefinitionReferences []PolicySetDefinitionPolicyDefinitionReference `pulumi:"policyDefinitionReferences"` // The Policy Set Definition type. Possible values are `BuiltIn`, `Custom`, `NotSpecified`, and `Static`. Changing this forces a new Policy Set Definition to be created. PolicyType string `pulumi:"policyType"` } // The set of arguments for constructing a PolicySetDefinition resource. type PolicySetDefinitionArgs struct { // The description of this Policy Set Definition. Description pulumi.StringPtrInput // The display name of this Policy Set Definition. DisplayName pulumi.StringInput // Deprecated: `managementGroupId` has been deprecated in favour of the `management.GroupPolicySetDefinition` resource and will be removed in v5.0 of the AzureRM Provider. ManagementGroupId pulumi.StringPtrInput // The metadata for the Policy Set Definition in JSON format. Metadata pulumi.StringPtrInput // The name which should be used for this Policy Set Definition. Changing this forces a new Policy Set Definition to be created. Name pulumi.StringPtrInput // The parameters for the Policy Set Definition in JSON format. Reducing the number of parameters forces a new resource to be created. Parameters pulumi.StringPtrInput // One or more `policyDefinitionGroup` blocks as defined below. PolicyDefinitionGroups PolicySetDefinitionPolicyDefinitionGroupArrayInput // One or more `policyDefinitionReference` blocks as defined below. PolicyDefinitionReferences PolicySetDefinitionPolicyDefinitionReferenceArrayInput // The Policy Set Definition type. Possible values are `BuiltIn`, `Custom`, `NotSpecified`, and `Static`. Changing this forces a new Policy Set Definition to be created. PolicyType pulumi.StringInput } func (PolicySetDefinitionArgs) ElementType() reflect.Type { return reflect.TypeOf((*policySetDefinitionArgs)(nil)).Elem() } type PolicySetDefinitionInput interface { pulumi.Input ToPolicySetDefinitionOutput() PolicySetDefinitionOutput ToPolicySetDefinitionOutputWithContext(ctx context.Context) PolicySetDefinitionOutput } func (*PolicySetDefinition) ElementType() reflect.Type { return reflect.TypeOf((**PolicySetDefinition)(nil)).Elem() } func (i *PolicySetDefinition) ToPolicySetDefinitionOutput() PolicySetDefinitionOutput { return i.ToPolicySetDefinitionOutputWithContext(context.Background()) } func (i *PolicySetDefinition) ToPolicySetDefinitionOutputWithContext(ctx context.Context) PolicySetDefinitionOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicySetDefinitionOutput) } // PolicySetDefinitionArrayInput is an input type that accepts PolicySetDefinitionArray and PolicySetDefinitionArrayOutput values. // You can construct a concrete instance of `PolicySetDefinitionArrayInput` via: // // PolicySetDefinitionArray{ PolicySetDefinitionArgs{...} } type PolicySetDefinitionArrayInput interface { pulumi.Input ToPolicySetDefinitionArrayOutput() PolicySetDefinitionArrayOutput ToPolicySetDefinitionArrayOutputWithContext(context.Context) PolicySetDefinitionArrayOutput } type PolicySetDefinitionArray []PolicySetDefinitionInput func (PolicySetDefinitionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*PolicySetDefinition)(nil)).Elem() } func (i PolicySetDefinitionArray) ToPolicySetDefinitionArrayOutput() PolicySetDefinitionArrayOutput { return i.ToPolicySetDefinitionArrayOutputWithContext(context.Background()) } func (i PolicySetDefinitionArray) ToPolicySetDefinitionArrayOutputWithContext(ctx context.Context) PolicySetDefinitionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicySetDefinitionArrayOutput) } // PolicySetDefinitionMapInput is an input type that accepts PolicySetDefinitionMap and PolicySetDefinitionMapOutput values. // You can construct a concrete instance of `PolicySetDefinitionMapInput` via: // // PolicySetDefinitionMap{ "key": PolicySetDefinitionArgs{...} } type PolicySetDefinitionMapInput interface { pulumi.Input ToPolicySetDefinitionMapOutput() PolicySetDefinitionMapOutput ToPolicySetDefinitionMapOutputWithContext(context.Context) PolicySetDefinitionMapOutput } type PolicySetDefinitionMap map[string]PolicySetDefinitionInput func (PolicySetDefinitionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PolicySetDefinition)(nil)).Elem() } func (i PolicySetDefinitionMap) ToPolicySetDefinitionMapOutput() PolicySetDefinitionMapOutput { return i.ToPolicySetDefinitionMapOutputWithContext(context.Background()) } func (i PolicySetDefinitionMap) ToPolicySetDefinitionMapOutputWithContext(ctx context.Context) PolicySetDefinitionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicySetDefinitionMapOutput) } type PolicySetDefinitionOutput struct{ *pulumi.OutputState } func (PolicySetDefinitionOutput) ElementType() reflect.Type { return reflect.TypeOf((**PolicySetDefinition)(nil)).Elem() } func (o PolicySetDefinitionOutput) ToPolicySetDefinitionOutput() PolicySetDefinitionOutput { return o } func (o PolicySetDefinitionOutput) ToPolicySetDefinitionOutputWithContext(ctx context.Context) PolicySetDefinitionOutput { return o } // The description of this Policy Set Definition. func (o PolicySetDefinitionOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *PolicySetDefinition) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The display name of this Policy Set Definition. func (o PolicySetDefinitionOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *PolicySetDefinition) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // Deprecated: `managementGroupId` has been deprecated in favour of the `management.GroupPolicySetDefinition` resource and will be removed in v5.0 of the AzureRM Provider. func (o PolicySetDefinitionOutput) ManagementGroupId() pulumi.StringPtrOutput { return o.ApplyT(func(v *PolicySetDefinition) pulumi.StringPtrOutput { return v.ManagementGroupId }).(pulumi.StringPtrOutput) } // The metadata for the Policy Set Definition in JSON format. func (o PolicySetDefinitionOutput) Metadata() pulumi.StringOutput { return o.ApplyT(func(v *PolicySetDefinition) pulumi.StringOutput { return v.Metadata }).(pulumi.StringOutput) } // The name which should be used for this Policy Set Definition. Changing this forces a new Policy Set Definition to be created. func (o PolicySetDefinitionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *PolicySetDefinition) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The parameters for the Policy Set Definition in JSON format. Reducing the number of parameters forces a new resource to be created. func (o PolicySetDefinitionOutput) Parameters() pulumi.StringPtrOutput { return o.ApplyT(func(v *PolicySetDefinition) pulumi.StringPtrOutput { return v.Parameters }).(pulumi.StringPtrOutput) } // One or more `policyDefinitionGroup` blocks as defined below. func (o PolicySetDefinitionOutput) PolicyDefinitionGroups() PolicySetDefinitionPolicyDefinitionGroupArrayOutput { return o.ApplyT(func(v *PolicySetDefinition) PolicySetDefinitionPolicyDefinitionGroupArrayOutput { return v.PolicyDefinitionGroups }).(PolicySetDefinitionPolicyDefinitionGroupArrayOutput) } // One or more `policyDefinitionReference` blocks as defined below. func (o PolicySetDefinitionOutput) PolicyDefinitionReferences() PolicySetDefinitionPolicyDefinitionReferenceArrayOutput { return o.ApplyT(func(v *PolicySetDefinition) PolicySetDefinitionPolicyDefinitionReferenceArrayOutput { return v.PolicyDefinitionReferences }).(PolicySetDefinitionPolicyDefinitionReferenceArrayOutput) } // The Policy Set Definition type. Possible values are `BuiltIn`, `Custom`, `NotSpecified`, and `Static`. Changing this forces a new Policy Set Definition to be created. func (o PolicySetDefinitionOutput) PolicyType() pulumi.StringOutput { return o.ApplyT(func(v *PolicySetDefinition) pulumi.StringOutput { return v.PolicyType }).(pulumi.StringOutput) } type PolicySetDefinitionArrayOutput struct{ *pulumi.OutputState } func (PolicySetDefinitionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*PolicySetDefinition)(nil)).Elem() } func (o PolicySetDefinitionArrayOutput) ToPolicySetDefinitionArrayOutput() PolicySetDefinitionArrayOutput { return o } func (o PolicySetDefinitionArrayOutput) ToPolicySetDefinitionArrayOutputWithContext(ctx context.Context) PolicySetDefinitionArrayOutput { return o } func (o PolicySetDefinitionArrayOutput) Index(i pulumi.IntInput) PolicySetDefinitionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PolicySetDefinition { return vs[0].([]*PolicySetDefinition)[vs[1].(int)] }).(PolicySetDefinitionOutput) } type PolicySetDefinitionMapOutput struct{ *pulumi.OutputState } func (PolicySetDefinitionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PolicySetDefinition)(nil)).Elem() } func (o PolicySetDefinitionMapOutput) ToPolicySetDefinitionMapOutput() PolicySetDefinitionMapOutput { return o } func (o PolicySetDefinitionMapOutput) ToPolicySetDefinitionMapOutputWithContext(ctx context.Context) PolicySetDefinitionMapOutput { return o } func (o PolicySetDefinitionMapOutput) MapIndex(k pulumi.StringInput) PolicySetDefinitionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PolicySetDefinition { return vs[0].(map[string]*PolicySetDefinition)[vs[1].(string)] }).(PolicySetDefinitionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*PolicySetDefinitionInput)(nil)).Elem(), &PolicySetDefinition{}) pulumi.RegisterInputType(reflect.TypeOf((*PolicySetDefinitionArrayInput)(nil)).Elem(), PolicySetDefinitionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*PolicySetDefinitionMapInput)(nil)).Elem(), PolicySetDefinitionMap{}) pulumi.RegisterOutputType(PolicySetDefinitionOutput{}) pulumi.RegisterOutputType(PolicySetDefinitionArrayOutput{}) pulumi.RegisterOutputType(PolicySetDefinitionMapOutput{}) }
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/policy/definition.go
sdk/go/azure/policy/definition.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 policy import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a policy rule definition on a management group or your provider subscription. // // Policy definitions do not take effect until they are assigned to a scope using a Policy Assignment. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/policy" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := policy.NewDefinition(ctx, "policy", &policy.DefinitionArgs{ // Name: pulumi.String("accTestPolicy"), // PolicyType: pulumi.String("Custom"), // Mode: pulumi.String("Indexed"), // DisplayName: pulumi.String("acceptance test policy definition"), // Metadata: pulumi.String(" {\n \\\"category\\\": \\\"General\\\"\n }\n\n"), // PolicyRule: pulumi.String(` { // "if": { // "not": { // "field": "location", // "in": "[parameters('allowedLocations')]" // } // }, // "then": { // "effect": "audit" // } // } // // `), // // Parameters: pulumi.String(` { // \"allowedLocations\": { // \"type\": \"Array\", // \"metadata\": { // \"description\": \"The list of allowed locations for resources.\", // \"displayName\": \"Allowed locations\", // \"strongType\": \"location\" // } // } // } // // `), // // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Policy Definitions can be imported using the `policy name`, e.g. // // ```sh // $ pulumi import azure:policy/definition:Definition examplePolicy /subscriptions/<SUBSCRIPTION_ID>/providers/Microsoft.Authorization/policyDefinitions/<POLICY_NAME> // ``` // // or // // ```sh // $ pulumi import azure:policy/definition:Definition examplePolicy /providers/Microsoft.Management/managementgroups/<MANGAGEMENT_GROUP_ID>/providers/Microsoft.Authorization/policyDefinitions/<POLICY_NAME> // ``` type Definition struct { pulumi.CustomResourceState // The description of the policy definition. Description pulumi.StringPtrOutput `pulumi:"description"` // The display name of the policy definition. DisplayName pulumi.StringOutput `pulumi:"displayName"` // The id of the Management Group where this policy should be defined. Changing this forces a new resource to be created. ManagementGroupId pulumi.StringPtrOutput `pulumi:"managementGroupId"` // The metadata for the policy definition. This is a JSON string representing additional metadata that should be stored with the policy definition. Metadata pulumi.StringOutput `pulumi:"metadata"` // The policy resource manager mode that allows you to specify which resource types will be evaluated. Possible values are `All`, `Indexed`, `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`. // // > **Note:** Other resource provider modes only support built-in policy definitions but may later become available in custom definitions, these include; `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`. [See here](https://docs.microsoft.com/en-us/azure/governance/policy/concepts/definition-structure#resource-provider-modes) for more details. Mode pulumi.StringOutput `pulumi:"mode"` // The name of the policy definition. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Parameters for the policy definition. This field is a JSON string that allows you to parameterize your policy definition. Reducing the number of parameters forces a new resource to be created. Parameters pulumi.StringPtrOutput `pulumi:"parameters"` // The policy rule for the policy definition. This is a JSON string representing the rule that contains an if and a then block. PolicyRule pulumi.StringPtrOutput `pulumi:"policyRule"` // The policy type. Possible values are `BuiltIn`, `Custom`, `NotSpecified` and `Static`. Changing this forces a new resource to be created. PolicyType pulumi.StringOutput `pulumi:"policyType"` // A list of role definition id extracted from `policyRule` required for remediation. RoleDefinitionIds pulumi.StringArrayOutput `pulumi:"roleDefinitionIds"` } // NewDefinition registers a new resource with the given unique name, arguments, and options. func NewDefinition(ctx *pulumi.Context, name string, args *DefinitionArgs, opts ...pulumi.ResourceOption) (*Definition, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } if args.Mode == nil { return nil, errors.New("invalid value for required argument 'Mode'") } if args.PolicyType == nil { return nil, errors.New("invalid value for required argument 'PolicyType'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Definition err := ctx.RegisterResource("azure:policy/definition:Definition", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDefinition gets an existing Definition 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 GetDefinition(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DefinitionState, opts ...pulumi.ResourceOption) (*Definition, error) { var resource Definition err := ctx.ReadResource("azure:policy/definition:Definition", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Definition resources. type definitionState struct { // The description of the policy definition. Description *string `pulumi:"description"` // The display name of the policy definition. DisplayName *string `pulumi:"displayName"` // The id of the Management Group where this policy should be defined. Changing this forces a new resource to be created. ManagementGroupId *string `pulumi:"managementGroupId"` // The metadata for the policy definition. This is a JSON string representing additional metadata that should be stored with the policy definition. Metadata *string `pulumi:"metadata"` // The policy resource manager mode that allows you to specify which resource types will be evaluated. Possible values are `All`, `Indexed`, `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`. // // > **Note:** Other resource provider modes only support built-in policy definitions but may later become available in custom definitions, these include; `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`. [See here](https://docs.microsoft.com/en-us/azure/governance/policy/concepts/definition-structure#resource-provider-modes) for more details. Mode *string `pulumi:"mode"` // The name of the policy definition. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Parameters for the policy definition. This field is a JSON string that allows you to parameterize your policy definition. Reducing the number of parameters forces a new resource to be created. Parameters *string `pulumi:"parameters"` // The policy rule for the policy definition. This is a JSON string representing the rule that contains an if and a then block. PolicyRule *string `pulumi:"policyRule"` // The policy type. Possible values are `BuiltIn`, `Custom`, `NotSpecified` and `Static`. Changing this forces a new resource to be created. PolicyType *string `pulumi:"policyType"` // A list of role definition id extracted from `policyRule` required for remediation. RoleDefinitionIds []string `pulumi:"roleDefinitionIds"` } type DefinitionState struct { // The description of the policy definition. Description pulumi.StringPtrInput // The display name of the policy definition. DisplayName pulumi.StringPtrInput // The id of the Management Group where this policy should be defined. Changing this forces a new resource to be created. ManagementGroupId pulumi.StringPtrInput // The metadata for the policy definition. This is a JSON string representing additional metadata that should be stored with the policy definition. Metadata pulumi.StringPtrInput // The policy resource manager mode that allows you to specify which resource types will be evaluated. Possible values are `All`, `Indexed`, `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`. // // > **Note:** Other resource provider modes only support built-in policy definitions but may later become available in custom definitions, these include; `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`. [See here](https://docs.microsoft.com/en-us/azure/governance/policy/concepts/definition-structure#resource-provider-modes) for more details. Mode pulumi.StringPtrInput // The name of the policy definition. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Parameters for the policy definition. This field is a JSON string that allows you to parameterize your policy definition. Reducing the number of parameters forces a new resource to be created. Parameters pulumi.StringPtrInput // The policy rule for the policy definition. This is a JSON string representing the rule that contains an if and a then block. PolicyRule pulumi.StringPtrInput // The policy type. Possible values are `BuiltIn`, `Custom`, `NotSpecified` and `Static`. Changing this forces a new resource to be created. PolicyType pulumi.StringPtrInput // A list of role definition id extracted from `policyRule` required for remediation. RoleDefinitionIds pulumi.StringArrayInput } func (DefinitionState) ElementType() reflect.Type { return reflect.TypeOf((*definitionState)(nil)).Elem() } type definitionArgs struct { // The description of the policy definition. Description *string `pulumi:"description"` // The display name of the policy definition. DisplayName string `pulumi:"displayName"` // The id of the Management Group where this policy should be defined. Changing this forces a new resource to be created. ManagementGroupId *string `pulumi:"managementGroupId"` // The metadata for the policy definition. This is a JSON string representing additional metadata that should be stored with the policy definition. Metadata *string `pulumi:"metadata"` // The policy resource manager mode that allows you to specify which resource types will be evaluated. Possible values are `All`, `Indexed`, `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`. // // > **Note:** Other resource provider modes only support built-in policy definitions but may later become available in custom definitions, these include; `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`. [See here](https://docs.microsoft.com/en-us/azure/governance/policy/concepts/definition-structure#resource-provider-modes) for more details. Mode string `pulumi:"mode"` // The name of the policy definition. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Parameters for the policy definition. This field is a JSON string that allows you to parameterize your policy definition. Reducing the number of parameters forces a new resource to be created. Parameters *string `pulumi:"parameters"` // The policy rule for the policy definition. This is a JSON string representing the rule that contains an if and a then block. PolicyRule *string `pulumi:"policyRule"` // The policy type. Possible values are `BuiltIn`, `Custom`, `NotSpecified` and `Static`. Changing this forces a new resource to be created. PolicyType string `pulumi:"policyType"` } // The set of arguments for constructing a Definition resource. type DefinitionArgs struct { // The description of the policy definition. Description pulumi.StringPtrInput // The display name of the policy definition. DisplayName pulumi.StringInput // The id of the Management Group where this policy should be defined. Changing this forces a new resource to be created. ManagementGroupId pulumi.StringPtrInput // The metadata for the policy definition. This is a JSON string representing additional metadata that should be stored with the policy definition. Metadata pulumi.StringPtrInput // The policy resource manager mode that allows you to specify which resource types will be evaluated. Possible values are `All`, `Indexed`, `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`. // // > **Note:** Other resource provider modes only support built-in policy definitions but may later become available in custom definitions, these include; `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`. [See here](https://docs.microsoft.com/en-us/azure/governance/policy/concepts/definition-structure#resource-provider-modes) for more details. Mode pulumi.StringInput // The name of the policy definition. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Parameters for the policy definition. This field is a JSON string that allows you to parameterize your policy definition. Reducing the number of parameters forces a new resource to be created. Parameters pulumi.StringPtrInput // The policy rule for the policy definition. This is a JSON string representing the rule that contains an if and a then block. PolicyRule pulumi.StringPtrInput // The policy type. Possible values are `BuiltIn`, `Custom`, `NotSpecified` and `Static`. Changing this forces a new resource to be created. PolicyType pulumi.StringInput } func (DefinitionArgs) ElementType() reflect.Type { return reflect.TypeOf((*definitionArgs)(nil)).Elem() } type DefinitionInput interface { pulumi.Input ToDefinitionOutput() DefinitionOutput ToDefinitionOutputWithContext(ctx context.Context) DefinitionOutput } func (*Definition) ElementType() reflect.Type { return reflect.TypeOf((**Definition)(nil)).Elem() } func (i *Definition) ToDefinitionOutput() DefinitionOutput { return i.ToDefinitionOutputWithContext(context.Background()) } func (i *Definition) ToDefinitionOutputWithContext(ctx context.Context) DefinitionOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionOutput) } // DefinitionArrayInput is an input type that accepts DefinitionArray and DefinitionArrayOutput values. // You can construct a concrete instance of `DefinitionArrayInput` via: // // DefinitionArray{ DefinitionArgs{...} } type DefinitionArrayInput interface { pulumi.Input ToDefinitionArrayOutput() DefinitionArrayOutput ToDefinitionArrayOutputWithContext(context.Context) DefinitionArrayOutput } type DefinitionArray []DefinitionInput func (DefinitionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Definition)(nil)).Elem() } func (i DefinitionArray) ToDefinitionArrayOutput() DefinitionArrayOutput { return i.ToDefinitionArrayOutputWithContext(context.Background()) } func (i DefinitionArray) ToDefinitionArrayOutputWithContext(ctx context.Context) DefinitionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionArrayOutput) } // DefinitionMapInput is an input type that accepts DefinitionMap and DefinitionMapOutput values. // You can construct a concrete instance of `DefinitionMapInput` via: // // DefinitionMap{ "key": DefinitionArgs{...} } type DefinitionMapInput interface { pulumi.Input ToDefinitionMapOutput() DefinitionMapOutput ToDefinitionMapOutputWithContext(context.Context) DefinitionMapOutput } type DefinitionMap map[string]DefinitionInput func (DefinitionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Definition)(nil)).Elem() } func (i DefinitionMap) ToDefinitionMapOutput() DefinitionMapOutput { return i.ToDefinitionMapOutputWithContext(context.Background()) } func (i DefinitionMap) ToDefinitionMapOutputWithContext(ctx context.Context) DefinitionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionMapOutput) } type DefinitionOutput struct{ *pulumi.OutputState } func (DefinitionOutput) ElementType() reflect.Type { return reflect.TypeOf((**Definition)(nil)).Elem() } func (o DefinitionOutput) ToDefinitionOutput() DefinitionOutput { return o } func (o DefinitionOutput) ToDefinitionOutputWithContext(ctx context.Context) DefinitionOutput { return o } // The description of the policy definition. func (o DefinitionOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *Definition) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The display name of the policy definition. func (o DefinitionOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *Definition) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // The id of the Management Group where this policy should be defined. Changing this forces a new resource to be created. func (o DefinitionOutput) ManagementGroupId() pulumi.StringPtrOutput { return o.ApplyT(func(v *Definition) pulumi.StringPtrOutput { return v.ManagementGroupId }).(pulumi.StringPtrOutput) } // The metadata for the policy definition. This is a JSON string representing additional metadata that should be stored with the policy definition. func (o DefinitionOutput) Metadata() pulumi.StringOutput { return o.ApplyT(func(v *Definition) pulumi.StringOutput { return v.Metadata }).(pulumi.StringOutput) } // The policy resource manager mode that allows you to specify which resource types will be evaluated. Possible values are `All`, `Indexed`, `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`. // // > **Note:** Other resource provider modes only support built-in policy definitions but may later become available in custom definitions, these include; `Microsoft.ContainerService.Data`, `Microsoft.CustomerLockbox.Data`, `Microsoft.DataCatalog.Data`, `Microsoft.KeyVault.Data`, `Microsoft.Kubernetes.Data`, `Microsoft.MachineLearningServices.Data`, `Microsoft.Network.Data` and `Microsoft.Synapse.Data`. [See here](https://docs.microsoft.com/en-us/azure/governance/policy/concepts/definition-structure#resource-provider-modes) for more details. func (o DefinitionOutput) Mode() pulumi.StringOutput { return o.ApplyT(func(v *Definition) pulumi.StringOutput { return v.Mode }).(pulumi.StringOutput) } // The name of the policy definition. Changing this forces a new resource to be created. func (o DefinitionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Definition) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Parameters for the policy definition. This field is a JSON string that allows you to parameterize your policy definition. Reducing the number of parameters forces a new resource to be created. func (o DefinitionOutput) Parameters() pulumi.StringPtrOutput { return o.ApplyT(func(v *Definition) pulumi.StringPtrOutput { return v.Parameters }).(pulumi.StringPtrOutput) } // The policy rule for the policy definition. This is a JSON string representing the rule that contains an if and a then block. func (o DefinitionOutput) PolicyRule() pulumi.StringPtrOutput { return o.ApplyT(func(v *Definition) pulumi.StringPtrOutput { return v.PolicyRule }).(pulumi.StringPtrOutput) } // The policy type. Possible values are `BuiltIn`, `Custom`, `NotSpecified` and `Static`. Changing this forces a new resource to be created. func (o DefinitionOutput) PolicyType() pulumi.StringOutput { return o.ApplyT(func(v *Definition) pulumi.StringOutput { return v.PolicyType }).(pulumi.StringOutput) } // A list of role definition id extracted from `policyRule` required for remediation. func (o DefinitionOutput) RoleDefinitionIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *Definition) pulumi.StringArrayOutput { return v.RoleDefinitionIds }).(pulumi.StringArrayOutput) } type DefinitionArrayOutput struct{ *pulumi.OutputState } func (DefinitionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Definition)(nil)).Elem() } func (o DefinitionArrayOutput) ToDefinitionArrayOutput() DefinitionArrayOutput { return o } func (o DefinitionArrayOutput) ToDefinitionArrayOutputWithContext(ctx context.Context) DefinitionArrayOutput { return o } func (o DefinitionArrayOutput) Index(i pulumi.IntInput) DefinitionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Definition { return vs[0].([]*Definition)[vs[1].(int)] }).(DefinitionOutput) } type DefinitionMapOutput struct{ *pulumi.OutputState } func (DefinitionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Definition)(nil)).Elem() } func (o DefinitionMapOutput) ToDefinitionMapOutput() DefinitionMapOutput { return o } func (o DefinitionMapOutput) ToDefinitionMapOutputWithContext(ctx context.Context) DefinitionMapOutput { return o } func (o DefinitionMapOutput) MapIndex(k pulumi.StringInput) DefinitionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Definition { return vs[0].(map[string]*Definition)[vs[1].(string)] }).(DefinitionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DefinitionInput)(nil)).Elem(), &Definition{}) pulumi.RegisterInputType(reflect.TypeOf((*DefinitionArrayInput)(nil)).Elem(), DefinitionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DefinitionMapInput)(nil)).Elem(), DefinitionMap{}) pulumi.RegisterOutputType(DefinitionOutput{}) pulumi.RegisterOutputType(DefinitionArrayOutput{}) pulumi.RegisterOutputType(DefinitionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
azukaar/GuPM
https://github.com/azukaar/GuPM/blob/53371f326bf98dc67536562adc10c3e206b41ad6/src/addDependency.go
src/addDependency.go
package main import ( "./provider" "./ui" "./utils" ) func AddDependency(path string, rls []string) error { var err error var packageConfig utils.Json var depList []map[string]interface{} var depProvider = Provider ui.Title("Add dependency...") if !ProviderWasForced && utils.FileExists(path+utils.Path("/gupm.json")) { config, _ := utils.ReadGupmJson(path + utils.Path("/gupm.json")) if config.Dependencies.DefaultProvider != "" { depProvider = config.Dependencies.DefaultProvider } } err = provider.InitProvider(Provider) if err != nil { return err } providerConfig, err = provider.GetProviderConfig(Provider) if err != nil { return err } packageConfig, err = provider.GetPackageConfig(path) if err != nil { return err } packageConfig, err = provider.PostGetPackageConfig(packageConfig) if err != nil { return err } depList, err = provider.GetDependencyList(packageConfig) if err != nil { return err } ui.Title("Adding to dependency list...") for _, str := range rls { dep := utils.BuildDependencyFromString(depProvider, str) resolved, err := provider.ResolveDependencyLocation(dep) if err != nil || resolved["url"].(string) == "" { ui.Error("Can't resolve", str) return err } dep["version"] = resolved["version"] depList = append(depList, dep) } if packageConfig != nil { err = provider.SaveDependencyList(path, depList) if err != nil { return err } } return nil }
go
ISC
53371f326bf98dc67536562adc10c3e206b41ad6
2026-01-07T09:43:21.197412Z
false
azukaar/GuPM
https://github.com/azukaar/GuPM/blob/53371f326bf98dc67536562adc10c3e206b41ad6/src/index.go
src/index.go
package main import ( "fmt" "os" "path/filepath" "regexp" "strings" "./jsVm" "./ui" "./utils" ) var Provider string func ScriptExists(path string) string { if utils.FileExists(path + ".gs") { return path + ".gs" } else if utils.FileExists(path) && !utils.IsDirectory(path) { return path } else { return "" } } func executeFile(path string, args Arguments) { _, err := jsVm.Run(path, args.AsJson()) if err != nil { ui.Error("File execution failed") ui.Error(err) Exit(1) } } func binFile(name string, args []string) { path := utils.Path("./.bin/" + name) realPath, _ := filepath.EvalSymlinks(path) err := utils.ExecCommand(realPath, args) if err != nil { ui.Error(err) Exit(1) } } func Exit(code int) { ui.Stop() os.Exit(code) } func runAlias(alias string) { commands := strings.Split(alias, ";") for _, command := range commands { commandList := strings.Split(command, " ") err := utils.ExecCommand(commandList[0], append(commandList[1:], os.Args[2:]...)) if err != nil { ui.Error(err) } } } func runAliasList(aliasList string) { aliases := strings.Split(aliasList, ";") for _, alias := range aliases { runhook(strings.Trim(alias, " ")) } } func main() { binFolder := make(map[string]bool) if utils.FileExists(".bin") { files, _ := utils.ReadDir(".bin") for _, file := range files { binFolder[file.Name()] = true } } c, args := GetArgs(os.Args[1:]) if utils.FileExists(".gupm_rc.gs") { executeFile(".gupm_rc.gs", args) } aliases := map[string]interface{}{} if utils.FileExists("gupm.json") { packageConfig, errConfig := utils.ReadGupmJson("gupm.json") if errConfig != nil { ui.Error(errConfig) } else { aliases = packageConfig.Cli.Aliases } } script := ScriptExists(c) if didExec, err := ExecCli(c, args); didExec { if err != nil { ui.Error(err) Exit(1) } if script != "" { executeFile(script, args) } } else if c == "env" || c == "e" { toProcess := os.Args[2:] re := regexp.MustCompile(`([\w\-\_]+)=([\w\-\_]+)`) isEnv := re.FindAllStringSubmatch(toProcess[0], -1) for isEnv != nil { name := isEnv[0][1] value := isEnv[0][2] os.Setenv(name, value) toProcess = toProcess[1:] isEnv = re.FindAllStringSubmatch(toProcess[0], -1) } utils.ExecCommand(toProcess[0], toProcess[1:]) } else if aliases[c] != nil { ch := make(chan int) listAlias, isArray := aliases[c].([]interface{}) if isArray { for _, aliasLine := range listAlias { go func(aliasLine string) { runAliasList(aliasLine) ch <- 0 }(aliasLine.(string)) } for range listAlias { <-ch } } else { runAliasList(aliases[c].(string)) } } else if binFolder[c] == true { binFile(c, os.Args[2:]) } else if script != "" { executeFile(script, args) } else if c == "" { fmt.Println("Welcome to GuPM version 1.0.0 \ntry 'g help' for a list of commands. Try 'g filename' to execute a file.") } else { fmt.Println("Command not found. Try 'g help' or check filename.") Exit(1) } ui.Stop() }
go
ISC
53371f326bf98dc67536562adc10c3e206b41ad6
2026-01-07T09:43:21.197412Z
false
azukaar/GuPM
https://github.com/azukaar/GuPM/blob/53371f326bf98dc67536562adc10c3e206b41ad6/src/installProject.go
src/installProject.go
package main import ( "errors" "fmt" "sync" "time" "./provider" "./ui" "./utils" "github.com/mitchellh/go-homedir" ) var cacheExpanded = make(map[string]map[string]interface{}) var lock = sync.RWMutex{} var lockList = sync.RWMutex{} func expandDepList(depList []map[string]interface{}) []map[string]interface{} { channel := make(chan int) for index, dep := range depList { go (func(channel chan int, index int, dep map[string]interface{}) { if dep["expanded"] != true { newDep := make(map[string]interface{}) for key, value := range dep { newDep[key] = value } newDep, errExpand := provider.ResolveDependencyLocation(newDep) if newDep == nil { ui.Error("Provider " + dep["provider"].(string) + " didnt resolve " + dep["name"].(string) + "@" + dep["version"].(string)) ui.Error(errExpand) channel <- 0 return } hdir, errH := homedir.Dir() if errH != nil { ui.Error(errH) hdir = "." } _, ok := newDep["url"].(string) if !ok || newDep["url"].(string) == "" { ui.Error("Cannot resolve : " + newDep["name"].(string)) channel <- 1 return } newDep["path"] = hdir + "/.gupm/cache/" + newDep["provider"].(string) + "/" + newDep["name"].(string) + "/" + newDep["version"].(string) if !utils.FileExists(newDep["path"].(string)) || !utils.FileExists(newDep["path"].(string)+"/.gupm_locked") { getRes, errorGD := provider.GetDependency( newDep["provider"].(string), newDep["name"].(string), newDep["version"].(string), newDep["url"].(string), newDep["path"].(string), ) if errorGD != nil { ui.Error(errorGD) } newPath, errorPGD := provider.PostGetDependency( newDep["provider"].(string), newDep["name"].(string), newDep["version"].(string), newDep["url"].(string), newDep["path"].(string), getRes, ) newDep["path"] = newPath if errorPGD != nil { ui.Error(errorPGD) } } lock.Lock() if newDep["expanded"] != true { if cacheExpanded[newDep["url"].(string)]["expanded"] != true { newDep, errExpand = provider.ExpandDependency(newDep) if errExpand != nil || newDep == nil || len(newDep) == 0 { ui.Error("Provider " + dep["provider"].(string) + " didnt expand " + dep["name"].(string) + "@" + dep["version"].(string)) ui.Error(errExpand) channel <- 0 return } newDep["expanded"] = true cacheExpanded[newDep["url"].(string)] = newDep } else { newDep = cacheExpanded[newDep["url"].(string)] } } ui.Log("Get dependency " + newDep["name"].(string)) lock.Unlock() lockList.Lock() depList[index] = newDep nextDepList, ok := depList[index]["dependencies"].([]map[string]interface{}) lockList.Unlock() if ok { res := expandDepList(nextDepList) lockList.Lock() depList[index]["dependencies"] = res lockList.Unlock() } } channel <- 1 })(channel, index, dep) } for range depList { i := <-channel if i == 0 { return nil } } return depList } func installDep(path string, depList []map[string]interface{}) map[string]string { installPaths := make(map[string]string) installPathsLock := sync.RWMutex{} var channel = make(chan int) for index, dep := range depList { go (func(channel chan int, index int, dep map[string]interface{}) { depProviderConfig, err := provider.GetProviderConfig(dep["provider"].(string)) destination := utils.Path(path + "/" + depProviderConfig.Config.Default.InstallPath) if dep["path"] != nil { packageConfig, errC := utils.ReadGupmJson(utils.Path(dep["path"].(string) + "/gupm.json")) if errC == nil && packageConfig != nil && packageConfig.WrapInstallFolder != "" { destination += utils.Path("/" + packageConfig.WrapInstallFolder) } } ui.Error(err) ui.Log("Installing " + path) provider.InstallDependency(destination, dep) // if path == "." { installPathsLock.Lock() installPaths[dep["provider"].(string)] = utils.Path(path + "/" + depProviderConfig.Config.Default.InstallPath) installPathsLock.Unlock() // } nextDepList, ok := depList[index]["dependencies"].([]map[string]interface{}) if ok { installDep(utils.Path(destination+"/"+depList[index]["name"].(string)), nextDepList) } channel <- 1 })(channel, index, dep) } for range depList { <-channel } return installPaths } var providerConfig *utils.GupmEntryPoint func InstallProject(path string) error { start := time.Now() ui.Title("Installing project...") var err error var packageConfig utils.Json var depList []map[string]interface{} err = provider.InitProvider(Provider) if err != nil { return err } providerConfig, err = provider.GetProviderConfig(Provider) ui.Error(err) packageConfig, _ = provider.GetPackageConfig(path) packageConfig, _ = provider.PostGetPackageConfig(packageConfig) depList, err = provider.GetDependencyList(packageConfig) if err != nil { return err } if depList == nil { ui.Log("No dependencies found.") return nil } ui.Title("Expand dependency list...") depList = expandDepList(depList) if depList == nil { return errors.New("Failed to expand dependancy list") } ui.Title("Build dependency list...") depList = provider.BuildDependencyTree(depList) if depList == nil { return errors.New("Failed to build dependancy list") } ui.Title("Install dependencies...") installPaths := installDep(path, depList) ui.Title("Install Binaries...") err = provider.BinaryInstall(path, installPaths) if err != nil { return err } ui.Title("Installation done ❤️") timeElapsed := fmt.Sprintf("%f", time.Since(start).Seconds()) ui.Log(timeElapsed + "s elapsed\n") return nil }
go
ISC
53371f326bf98dc67536562adc10c3e206b41ad6
2026-01-07T09:43:21.197412Z
false
azukaar/GuPM
https://github.com/azukaar/GuPM/blob/53371f326bf98dc67536562adc10c3e206b41ad6/src/cli_test.go
src/cli_test.go
package main import ( "testing" // "reflect" _ "fmt" "github.com/stretchr/testify/require" ) func TestArgs(t *testing.T) { require := require.New(t) // Basic command, args := GetArgs([]string{"make", "-p", "npm"}) require.Equal("make", command) require.Equal(Arguments{"$0": "make --p npm", "P": "npm"}, args) // Nothing command, args = GetArgs([]string{}) require.Equal("", command) require.Equal(Arguments{"$0": ""}, args) // No args command, args = GetArgs([]string{"install"}) require.Equal("install", command) require.Equal(Arguments{"$0": "install"}, args) // bools and long mix command, args = GetArgs([]string{"install", "--dev", "--provider", "npm"}) require.Equal("install", command) require.Equal(Arguments{"$0": "install --dev --provider npm", "Dev": "true", "Provider": "npm"}, args) command, args = GetArgs([]string{"install", "--provider", "npm", "--dev"}) require.Equal("install", command) require.Equal(Arguments{"$0": "install --provider npm --dev", "Dev": "true", "Provider": "npm"}, args) // bools at the end command, args = GetArgs([]string{"install", "--dev"}) require.Equal("install", command) require.Equal(Arguments{"$0": "install --dev", "Dev": "true"}, args) // long args command, args = GetArgs([]string{"install", "--provider", "npm"}) require.Equal("install", command) require.Equal(Arguments{"$0": "install --provider npm", "Provider": "npm"}, args) // anonymous command, args = GetArgs([]string{"install", "npm"}) require.Equal("install", command) require.Equal(Arguments{"$0": "install npm", "$1": "npm"}, args) // asList command, args = GetArgs([]string{"install", "go", "npm"}) require.Equal([]string{"go", "npm"}, args.AsList()) }
go
ISC
53371f326bf98dc67536562adc10c3e206b41ad6
2026-01-07T09:43:21.197412Z
false
azukaar/GuPM
https://github.com/azukaar/GuPM/blob/53371f326bf98dc67536562adc10c3e206b41ad6/src/cache.go
src/cache.go
package main import ( "./ui" "./utils" "github.com/mitchellh/go-homedir" ) func CacheClear() { hdir, errH := homedir.Dir() if errH != nil { ui.Error(errH) hdir = "." } folder := utils.Path(hdir + "/.gupm/cache/") utils.RemoveFiles([]string{folder}) }
go
ISC
53371f326bf98dc67536562adc10c3e206b41ad6
2026-01-07T09:43:21.197412Z
false
azukaar/GuPM
https://github.com/azukaar/GuPM/blob/53371f326bf98dc67536562adc10c3e206b41ad6/src/publish.go
src/publish.go
package main import ( "./provider" "./ui" ) func Publish(path string, namespace string) error { err := provider.InitProvider(Provider) if err != nil { return err } ui.Title("Publishing package...") errPub := provider.Publish(path, namespace) if errPub != nil { return errPub } else { ui.Title("Publish done! ❤️") } return nil }
go
ISC
53371f326bf98dc67536562adc10c3e206b41ad6
2026-01-07T09:43:21.197412Z
false
azukaar/GuPM
https://github.com/azukaar/GuPM/blob/53371f326bf98dc67536562adc10c3e206b41ad6/src/plugins.go
src/plugins.go
package main import ( "fmt" "os" "path/filepath" "strings" "./provider" "./ui" "./utils" ) func PluginLink(path string) { configPath := utils.Path(path + "/gupm.json") if utils.FileExists(configPath) { packageConfig := new(utils.GupmEntryPoint) errConfig := utils.ReadJSON(configPath, &packageConfig) if errConfig != nil { ui.Error("Can't read provider configuration") ui.Error(errConfig) return } pluginFolder := utils.HOMEDIR(".") + utils.Path("/.gupm/plugins/") os.MkdirAll(pluginFolder, os.ModePerm) err := os.Symlink(utils.AbsPath(path), pluginFolder+packageConfig.Name) if err != nil { ui.Error(err) } } else { ui.Error("Can't find provider configuration") } } func PluginInstall(path string, plugins []string) error { ui.Title("Install plugin...") pluginFolder := utils.HOMEDIR(".") + utils.Path("/.gupm/plugins/") for _, rls := range plugins { ui.Log(rls) newDep, err := provider.ResolveDependencyLocation(utils.BuildDependencyFromString("https", rls)) if err != nil { return err } pluginName := filepath.Base(newDep["name"].(string)) if len(strings.Split(pluginName, ":")) > 1 { pluginName = strings.Split(pluginName, ":")[1] } if len(strings.Split(pluginName, "/")) > 1 { pluginName = strings.Split(pluginName, "/")[1] } newDep["path"] = pluginFolder + utils.Path(pluginName) getRes, errorGD := provider.GetDependency( newDep["provider"].(string), newDep["name"].(string), newDep["version"].(string), newDep["url"].(string), newDep["path"].(string), ) if errorGD != nil { return errorGD } _, errorPGD := provider.PostGetDependency( newDep["provider"].(string), newDep["name"].(string), newDep["version"].(string), newDep["url"].(string), newDep["path"].(string), getRes, ) if errorPGD != nil { return errorPGD } InstallProject(newDep["path"].(string)) ui.Title("Installation done ❤️") } return nil } func PluginDelete(path string, plugins []string) { folders := make([]string, 0) pluginFolder := utils.HOMEDIR(".") + utils.Path("/.gupm/plugins/") for _, str := range plugins { folders = append(folders, pluginFolder+str) } utils.RemoveFiles(folders) fmt.Println("Done deleting.") } func PluginCreate(path string) { fmt.Println("Welcome to the plugin creation assistant") name := "provider-" + ui.WaitForInput("What is the name of the plugin? provider-") description := ui.WaitForInput("Enter a description: ") author := ui.WaitForInput("Enter the author: ") licence := ui.WaitForInput("Enter the licence (ISC): ") ppath := utils.Path(path + "/" + name) os.MkdirAll(ppath, os.ModePerm) os.MkdirAll(ppath+utils.Path("/docs/repo"), os.ModePerm) utils.WriteFile(ppath+utils.Path("/gupm.json"), `{ "name": "`+name+`", "version": "0.0.1", "description": "`+description+`", "author": "`+author+`", "licence": "`+licence+`", "publish": { "source": ["."], "dest": "../docs/repo" }, "config": { "default": { "entrypoint": "gupm.json", "installPath": "gupm_modules" } } }`) fmt.Println("creation done.") }
go
ISC
53371f326bf98dc67536562adc10c3e206b41ad6
2026-01-07T09:43:21.197412Z
false
azukaar/GuPM
https://github.com/azukaar/GuPM/blob/53371f326bf98dc67536562adc10c3e206b41ad6/src/self.go
src/self.go
package main import ( "./ui" "./utils" "io/ioutil" "os" "os/exec" "runtime" ) // TODO: implemement script-free upgrade for all OSes func SelfUpgrade() { SelfUninstall() if runtime.GOOS != "windows" { script := utils.HttpGet("https://azukaar.github.io/GuPM/install.sh") ioutil.WriteFile("TEMP_install.sh", []byte(script), os.ModePerm) cmd := exec.Command("/bin/sh", "TEMP_install.sh") cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr cmd.Stdin = os.Stdin cmd.Run() utils.RemoveFiles([]string{"TEMP_install.sh"}) } else { ui.Error("Upgrade not fully implememnted on windows yet. Please execute windows_installer.exe again") } } func SelfUninstall() { utils.RemoveFiles([]string{utils.DIRNAME()}) if runtime.GOOS != "windows" { utils.RemoveFiles([]string{"/usr/local/bin/g", "/bin/g"}) } }
go
ISC
53371f326bf98dc67536562adc10c3e206b41ad6
2026-01-07T09:43:21.197412Z
false
azukaar/GuPM
https://github.com/azukaar/GuPM/blob/53371f326bf98dc67536562adc10c3e206b41ad6/src/cli.go
src/cli.go
package main import ( "fmt" "regexp" "strconv" "strings" "./ui" "./utils" ) type json = utils.Json var ProviderWasForced = false type Arguments map[string]string func (a *Arguments) AsJson() json { res := utils.Json{} for i, v := range *a { res[i] = v } return res } func (a *Arguments) Join() string { res := "" for i, v := range *a { if v == "true" || v == "false" { res += "--" + strings.ToLower(i) + " " } else if ok, _ := regexp.MatchString(`^\$\d+`, i); ok { res += v + " " } else { res += "--" + strings.ToLower(i) + " " + v + " " } } return strings.TrimSpace(res) } func (a *Arguments) AsList() []string { res := []string{} i := 1 for (*a)["$"+strconv.Itoa(i)] != "" { res = append(res, (*a)["$"+strconv.Itoa(i)]) i++ } return res } func (a *Arguments) Shift() { i := 2 for (*a)["$"+strconv.Itoa(i)] != "" { (*a)["$"+strconv.Itoa(i-1)] = (*a)["$"+strconv.Itoa(i)] i++ } (*a)["$"+strconv.Itoa(i-1)] = "" } func GetArgs(args []string) (string, Arguments) { arguments := make(Arguments) next := "" dolsI := 1 if len(args) == 0 { arguments["$0"] = "" return "", arguments } command := args[0] if len(args) < 2 { arguments["$0"] = command return command, arguments } argsToParse := args[1:] for _, value := range argsToParse { nameCheck := regexp.MustCompile(`^--?(\w+)`) tryname := nameCheck.FindString(value) if tryname != "" { long, _ := regexp.MatchString(`^--`, tryname) if long { tryname = tryname[1:] } if next != "" { arguments[next] = "true" next = "" } next = strings.ToUpper(tryname[1:2]) + tryname[2:] } else { if next != "" { arguments[next] = value next = "" } else { arguments["$"+strconv.FormatInt(int64(dolsI), 10)] = value dolsI++ } } } if next != "" { arguments[next] = "true" } arguments["$0"] = command + " " + arguments.Join() return command, arguments } func getProvider(c string, args Arguments) string { gupmConfig := utils.GupmConfig() defaultProvider := "gupm" if c == "install" || c == "global" { defaultProvider = gupmConfig.DefaultProvider } if defaultProvider == "os" { osName := utils.OSNAME() if gupmConfig.OsProviders[osName] != "" { defaultProvider = gupmConfig.OsProviders[osName] } else { ui.Error("No provider set for", osName) return utils.DIRNAME() } } if utils.FileExists("gupm.json") { config, err := utils.ReadGupmJson("gupm.json") if err != nil { ui.Error(err) } else { if config.Cli.DefaultProviders[c] != "" { defaultProvider = config.Cli.DefaultProviders[c] } } } if args["Provider"] != "" { ProviderWasForced = true return args["Provider"] } else if args["P"] != "" { ProviderWasForced = true return args["P"] } else { return defaultProvider } } func ExecCli(c string, args Arguments) (bool, error) { var err error notFound := "Cannot find commmand" shorthands := map[string]string{ "h": "help", "m": "make", "i": "install", "d": "delete", "p": "publish", "b": "bootstrap", "c": "cache", "s": "self", "t": "test", "pl": "plugin", "g": "global", } if shorthands[c] != "" { c = shorthands[c] } if provider := getProvider(c, args); provider != "" { Provider = provider } if c == "help" { fmt.Println("make / m :", "[--provider=]", "Install projects depdencies based on info in the entry point (depends on provider)") fmt.Println("install / i :", "[--provider=]", "Install package") fmt.Println("remove / r :", "[--provider=]", "remove package from module config") fmt.Println("publish / p :", "[--provider=]", "publish a project based on the model of your specific provider") fmt.Println("bootstrap / b :", "[--provider=]", "bootstrap a new project based on the model of your specific provider") fmt.Println("test / t :", "[--provider=] Run project's tests in tests folder.") fmt.Println("global / g :", "install or delete global packages") fmt.Println("cache / c :", "clear or check the cache with \"cache clear\" or \"cache check\"") fmt.Println("self / s :", "self manage gupm. Try g \"self upgrade\" or \"g self uninstall\"") fmt.Println("plugin / pl :", "To install a plugin \"g pl install\". Then use \"g pl create\" to create a new one and \"g pl link\" to test your plugin") } else if c == "make" { BuildGitHooks(".") err = InstallProject(".") } else if c == "install" { err = AddDependency(".", args.AsList()) if err == nil { err = InstallProject(".") } } else if c == "publish" { err = Publish(".", args["$1"]) } else if c == "delete" { err = RemoveDependency(".", args.AsList()) } else if c == "global" { if args["$1"] == "install" || args["$1"] == "i" { args.Shift() GlobalAdd(args.AsList()) } else if args["$1"] == "delete" || args["$1"] == "d" { args.Shift() GlobalDelete(args.AsList()) } else { ui.Error(notFound, args["$1"], "\n", "try install or delete") } } else if c == "plugin" { if args["$1"] == "create" { PluginCreate(".") } else if args["$1"] == "link" { PluginLink(".") } else if args["$1"] == "install" { err = PluginInstall(".", args.AsList()[1:]) } else if args["$1"] == "delete" { PluginDelete(".", args.AsList()[1:]) } else { ui.Error(notFound, args["$1"], "\n", "try cache clear or cache check") } } else if c == "cache" { if args["$1"] == "clear" { CacheClear() } else if args["$1"] == "check" { ui.Error("Not implemented yet.") } else { ui.Error(notFound, args["$1"], "\n", "try cache clear or cache check") } } else if c == "self" { if args["$1"] == "upgrade" { SelfUpgrade() } else if args["$1"] == "uninstall" { SelfUninstall() } else { ui.Error(notFound, args["$1"]) } } else if c == "bootstrap" { err = Bootstrap(".") } else if c == "test" { RunTest("tests") } else if c == "hook" { RunHook(".", args["$1"]) } else { return false, nil } return true, err }
go
ISC
53371f326bf98dc67536562adc10c3e206b41ad6
2026-01-07T09:43:21.197412Z
false
azukaar/GuPM
https://github.com/azukaar/GuPM/blob/53371f326bf98dc67536562adc10c3e206b41ad6/src/bootstrap.go
src/bootstrap.go
package main import ( "./provider" "./ui" // "fmt" ) func Bootstrap(path string) error { err := provider.InitProvider(Provider) if err != nil { return err } ui.Title("Bootstrap project") errBoot := provider.Bootstrap(path) if errBoot != nil { return errBoot } else { ui.Title("Bootstrap done! ❤️") } return nil }
go
ISC
53371f326bf98dc67536562adc10c3e206b41ad6
2026-01-07T09:43:21.197412Z
false
azukaar/GuPM
https://github.com/azukaar/GuPM/blob/53371f326bf98dc67536562adc10c3e206b41ad6/src/gitHooks.go
src/gitHooks.go
package main import ( "fmt" "os" "regexp" "strings" "./utils" "github.com/bmatcuk/doublestar" ) func BuildGitHooks(path string) { if utils.FileExists(".git") { if !utils.FileExists(".git/hooks/pre-commit") { utils.WriteFile(".git/hooks/pre-commit", "g hook precommit") } if !utils.FileExists(".git/hooks/pre-push") { utils.WriteFile(".git/hooks/pre-push", "g hook prepush") } } } func runhook(hook string) { commandList := strings.Split(hook, " ") stagedFiles, _ := utils.RunCommand("git", []string{"diff", "--cached", "--name-only"}) unPushedFiles := "" fyg, _ := utils.RunCommand("git", []string{"log", "--branches", "--not", "--remotes", "--name-status", "--oneline"}) unPushedFilesRaw := strings.Split(fyg, "\n") extractFileName := regexp.MustCompile(`^[AM]\b(.*)`) for _, v := range unPushedFilesRaw { if extracted := extractFileName.FindStringSubmatch(v); len(extracted) > 0 { unPushedFiles += strings.Trim(extracted[1], " ") + "\n" } } unPushedFiles = strings.Trim(unPushedFiles, " ") for i, v := range commandList { stagedFilesCheck := regexp.MustCompile(`^\$StagedFiles(\(([\w\/\.\*\-\_]+)?\)?)?`) tryStagedFiles := stagedFilesCheck.FindStringSubmatch(v) unpushedFilesCheck := regexp.MustCompile(`^\$UnpushedFiles(\(([\w\/\.\*\-\_]+)?\)?)?`) tryUnpushedFiles := unpushedFilesCheck.FindStringSubmatch(v) if len(tryStagedFiles) == 3 { if tryStagedFiles[2] == "" { commandList[i] = strings.ReplaceAll(stagedFiles, " ", "\\ ") commandList[i] = strings.ReplaceAll(commandList[i], "\n", " ") } else { commandList[i] = "" stagedFilesList := strings.Split(stagedFiles, "\n") for _, s := range stagedFilesList { isIn, _ := doublestar.Match(tryStagedFiles[2], s) if isIn { commandList[i] += strings.ReplaceAll(s, " ", "\\ ") + " " } } commandList[i] = strings.Trim(commandList[i], " ") } } if len(tryUnpushedFiles) == 3 { if tryUnpushedFiles[2] == "" { commandList[i] = strings.ReplaceAll(unPushedFiles, " ", "\\ ") commandList[i] = strings.ReplaceAll(commandList[i], "\n", " ") } else { commandList[i] = "" unpushedFilesList := strings.Split(unPushedFiles, "\n") for _, s := range unpushedFilesList { isIn, _ := doublestar.Match(tryUnpushedFiles[2], s) if isIn { commandList[i] += strings.ReplaceAll(s, " ", "\\ ") + " " } } commandList[i] = strings.Trim(commandList[i], " ") } } } commandListConsolidated := strings.Trim(strings.Join(commandList, " "), " ") commandList = strings.Split(commandListConsolidated, " ") err := utils.ExecCommand(commandList[0], append(commandList[1:])) if err != nil { fmt.Println(err) os.Exit(1) } } func runhooklist(hooklist string) { hooks := strings.Split(hooklist, ";") for _, hook := range hooks { runhook(strings.Trim(hook, " ")) } } func runHooks(hooks interface{}) { ch := make(chan int) listHooks, isArray := hooks.([]interface{}) if isArray { for _, hook := range listHooks { go func(hook string) { runhooklist(hook) ch <- 0 }(hook.(string)) } for range listHooks { <-ch } } else { runhooklist(hooks.(string)) } } func RunHook(path string, hook string) { config, _ := utils.ReadGupmJson("gupm.json") if hook == "precommit" && config.Git.Hooks.Precommit != nil { runHooks(config.Git.Hooks.Precommit) } if hook == "prepush" && config.Git.Hooks.Prepush != nil { runHooks(config.Git.Hooks.Prepush) } }
go
ISC
53371f326bf98dc67536562adc10c3e206b41ad6
2026-01-07T09:43:21.197412Z
false
azukaar/GuPM
https://github.com/azukaar/GuPM/blob/53371f326bf98dc67536562adc10c3e206b41ad6/src/test.go
src/test.go
package main import ( "os" "regexp" "strconv" "./jsVm" "./ui" "./utils" ) func RunTest(path string) { _ = jsVm.Run files := utils.RecursiveFileWalkDir(path) i := 0 for _, file := range files { isTest, _ := regexp.MatchString(`\.test\.gs$`, file) if isTest { os.MkdirAll(".tmp_test_gupm", os.ModePerm) utils.CopyFiles([]string{file}, ".tmp_test_gupm/"+strconv.Itoa(i)+".gs") errch := os.Chdir(".tmp_test_gupm") if errch != nil { ui.Error("Could'n execute", file) Exit(1) } _, err := jsVm.Run(strconv.Itoa(i)+".gs", make(map[string]interface{})) os.Chdir("..") utils.RemoveFiles([]string{".tmp_test_gupm"}) if err != nil { ui.Error("Test execution failed:", file) Exit(1) } i++ } } ui.Title("Test passed! ❤️") }
go
ISC
53371f326bf98dc67536562adc10c3e206b41ad6
2026-01-07T09:43:21.197412Z
false