github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/datasync/locationAzureBlob.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package datasync 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Manages a Microsoft Azure Blob Storage Location within AWS DataSync. 16 // 17 // > **NOTE:** The DataSync Agents must be available before creating this resource. 18 // 19 // ## Example Usage 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datasync" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // _, err := datasync.NewLocationAzureBlob(ctx, "example", &datasync.LocationAzureBlobArgs{ 35 // AgentArns: pulumi.StringArray{ 36 // exampleAwsDatasyncAgent.Arn, 37 // }, 38 // AuthenticationType: pulumi.String("SAS"), 39 // ContainerUrl: pulumi.String("https://myaccount.blob.core.windows.net/mycontainer"), 40 // SasConfiguration: &datasync.LocationAzureBlobSasConfigurationArgs{ 41 // Token: pulumi.String("sp=r&st=2023-12-20T14:54:52Z&se=2023-12-20T22:54:52Z&spr=https&sv=2021-06-08&sr=c&sig=aBBKDWQvyuVcTPH9EBp%2FXTI9E%2F%2Fmq171%2BZU178wcwqU%3D"), 42 // }, 43 // }) 44 // if err != nil { 45 // return err 46 // } 47 // return nil 48 // }) 49 // } 50 // 51 // ``` 52 // <!--End PulumiCodeChooser --> 53 // 54 // ## Import 55 // 56 // Using `pulumi import`, import `aws_datasync_location_azure_blob` using the Amazon Resource Name (ARN). For example: 57 // 58 // ```sh 59 // $ pulumi import aws:datasync/locationAzureBlob:LocationAzureBlob example arn:aws:datasync:us-east-1:123456789012:location/loc-12345678901234567 60 // ``` 61 type LocationAzureBlob struct { 62 pulumi.CustomResourceState 63 64 // The access tier that you want your objects or files transferred into. Valid values: `HOT`, `COOL` and `ARCHIVE`. Default: `HOT`. 65 AccessTier pulumi.StringPtrOutput `pulumi:"accessTier"` 66 // A list of DataSync Agent ARNs with which this location will be associated. 67 AgentArns pulumi.StringArrayOutput `pulumi:"agentArns"` 68 // Amazon Resource Name (ARN) of the DataSync Location. 69 Arn pulumi.StringOutput `pulumi:"arn"` 70 // The authentication method DataSync uses to access your Azure Blob Storage. Valid values: `SAS`. 71 AuthenticationType pulumi.StringOutput `pulumi:"authenticationType"` 72 // The type of blob that you want your objects or files to be when transferring them into Azure Blob Storage. Valid values: `BLOB`. Default: `BLOB`. 73 BlobType pulumi.StringPtrOutput `pulumi:"blobType"` 74 // The URL of the Azure Blob Storage container involved in your transfer. 75 ContainerUrl pulumi.StringOutput `pulumi:"containerUrl"` 76 // The SAS configuration that allows DataSync to access your Azure Blob Storage. See configuration below. 77 SasConfiguration LocationAzureBlobSasConfigurationPtrOutput `pulumi:"sasConfiguration"` 78 // Path segments if you want to limit your transfer to a virtual directory in the container. 79 Subdirectory pulumi.StringOutput `pulumi:"subdirectory"` 80 // Key-value pairs of resource tags to assign to the DataSync Location. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 81 Tags pulumi.StringMapOutput `pulumi:"tags"` 82 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 83 // 84 // Deprecated: Please use `tags` instead. 85 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 86 Uri pulumi.StringOutput `pulumi:"uri"` 87 } 88 89 // NewLocationAzureBlob registers a new resource with the given unique name, arguments, and options. 90 func NewLocationAzureBlob(ctx *pulumi.Context, 91 name string, args *LocationAzureBlobArgs, opts ...pulumi.ResourceOption) (*LocationAzureBlob, error) { 92 if args == nil { 93 return nil, errors.New("missing one or more required arguments") 94 } 95 96 if args.AgentArns == nil { 97 return nil, errors.New("invalid value for required argument 'AgentArns'") 98 } 99 if args.AuthenticationType == nil { 100 return nil, errors.New("invalid value for required argument 'AuthenticationType'") 101 } 102 if args.ContainerUrl == nil { 103 return nil, errors.New("invalid value for required argument 'ContainerUrl'") 104 } 105 opts = internal.PkgResourceDefaultOpts(opts) 106 var resource LocationAzureBlob 107 err := ctx.RegisterResource("aws:datasync/locationAzureBlob:LocationAzureBlob", name, args, &resource, opts...) 108 if err != nil { 109 return nil, err 110 } 111 return &resource, nil 112 } 113 114 // GetLocationAzureBlob gets an existing LocationAzureBlob resource's state with the given name, ID, and optional 115 // state properties that are used to uniquely qualify the lookup (nil if not required). 116 func GetLocationAzureBlob(ctx *pulumi.Context, 117 name string, id pulumi.IDInput, state *LocationAzureBlobState, opts ...pulumi.ResourceOption) (*LocationAzureBlob, error) { 118 var resource LocationAzureBlob 119 err := ctx.ReadResource("aws:datasync/locationAzureBlob:LocationAzureBlob", name, id, state, &resource, opts...) 120 if err != nil { 121 return nil, err 122 } 123 return &resource, nil 124 } 125 126 // Input properties used for looking up and filtering LocationAzureBlob resources. 127 type locationAzureBlobState struct { 128 // The access tier that you want your objects or files transferred into. Valid values: `HOT`, `COOL` and `ARCHIVE`. Default: `HOT`. 129 AccessTier *string `pulumi:"accessTier"` 130 // A list of DataSync Agent ARNs with which this location will be associated. 131 AgentArns []string `pulumi:"agentArns"` 132 // Amazon Resource Name (ARN) of the DataSync Location. 133 Arn *string `pulumi:"arn"` 134 // The authentication method DataSync uses to access your Azure Blob Storage. Valid values: `SAS`. 135 AuthenticationType *string `pulumi:"authenticationType"` 136 // The type of blob that you want your objects or files to be when transferring them into Azure Blob Storage. Valid values: `BLOB`. Default: `BLOB`. 137 BlobType *string `pulumi:"blobType"` 138 // The URL of the Azure Blob Storage container involved in your transfer. 139 ContainerUrl *string `pulumi:"containerUrl"` 140 // The SAS configuration that allows DataSync to access your Azure Blob Storage. See configuration below. 141 SasConfiguration *LocationAzureBlobSasConfiguration `pulumi:"sasConfiguration"` 142 // Path segments if you want to limit your transfer to a virtual directory in the container. 143 Subdirectory *string `pulumi:"subdirectory"` 144 // Key-value pairs of resource tags to assign to the DataSync Location. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 145 Tags map[string]string `pulumi:"tags"` 146 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 147 // 148 // Deprecated: Please use `tags` instead. 149 TagsAll map[string]string `pulumi:"tagsAll"` 150 Uri *string `pulumi:"uri"` 151 } 152 153 type LocationAzureBlobState struct { 154 // The access tier that you want your objects or files transferred into. Valid values: `HOT`, `COOL` and `ARCHIVE`. Default: `HOT`. 155 AccessTier pulumi.StringPtrInput 156 // A list of DataSync Agent ARNs with which this location will be associated. 157 AgentArns pulumi.StringArrayInput 158 // Amazon Resource Name (ARN) of the DataSync Location. 159 Arn pulumi.StringPtrInput 160 // The authentication method DataSync uses to access your Azure Blob Storage. Valid values: `SAS`. 161 AuthenticationType pulumi.StringPtrInput 162 // The type of blob that you want your objects or files to be when transferring them into Azure Blob Storage. Valid values: `BLOB`. Default: `BLOB`. 163 BlobType pulumi.StringPtrInput 164 // The URL of the Azure Blob Storage container involved in your transfer. 165 ContainerUrl pulumi.StringPtrInput 166 // The SAS configuration that allows DataSync to access your Azure Blob Storage. See configuration below. 167 SasConfiguration LocationAzureBlobSasConfigurationPtrInput 168 // Path segments if you want to limit your transfer to a virtual directory in the container. 169 Subdirectory pulumi.StringPtrInput 170 // Key-value pairs of resource tags to assign to the DataSync Location. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 171 Tags pulumi.StringMapInput 172 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 173 // 174 // Deprecated: Please use `tags` instead. 175 TagsAll pulumi.StringMapInput 176 Uri pulumi.StringPtrInput 177 } 178 179 func (LocationAzureBlobState) ElementType() reflect.Type { 180 return reflect.TypeOf((*locationAzureBlobState)(nil)).Elem() 181 } 182 183 type locationAzureBlobArgs struct { 184 // The access tier that you want your objects or files transferred into. Valid values: `HOT`, `COOL` and `ARCHIVE`. Default: `HOT`. 185 AccessTier *string `pulumi:"accessTier"` 186 // A list of DataSync Agent ARNs with which this location will be associated. 187 AgentArns []string `pulumi:"agentArns"` 188 // The authentication method DataSync uses to access your Azure Blob Storage. Valid values: `SAS`. 189 AuthenticationType string `pulumi:"authenticationType"` 190 // The type of blob that you want your objects or files to be when transferring them into Azure Blob Storage. Valid values: `BLOB`. Default: `BLOB`. 191 BlobType *string `pulumi:"blobType"` 192 // The URL of the Azure Blob Storage container involved in your transfer. 193 ContainerUrl string `pulumi:"containerUrl"` 194 // The SAS configuration that allows DataSync to access your Azure Blob Storage. See configuration below. 195 SasConfiguration *LocationAzureBlobSasConfiguration `pulumi:"sasConfiguration"` 196 // Path segments if you want to limit your transfer to a virtual directory in the container. 197 Subdirectory *string `pulumi:"subdirectory"` 198 // Key-value pairs of resource tags to assign to the DataSync Location. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 199 Tags map[string]string `pulumi:"tags"` 200 } 201 202 // The set of arguments for constructing a LocationAzureBlob resource. 203 type LocationAzureBlobArgs struct { 204 // The access tier that you want your objects or files transferred into. Valid values: `HOT`, `COOL` and `ARCHIVE`. Default: `HOT`. 205 AccessTier pulumi.StringPtrInput 206 // A list of DataSync Agent ARNs with which this location will be associated. 207 AgentArns pulumi.StringArrayInput 208 // The authentication method DataSync uses to access your Azure Blob Storage. Valid values: `SAS`. 209 AuthenticationType pulumi.StringInput 210 // The type of blob that you want your objects or files to be when transferring them into Azure Blob Storage. Valid values: `BLOB`. Default: `BLOB`. 211 BlobType pulumi.StringPtrInput 212 // The URL of the Azure Blob Storage container involved in your transfer. 213 ContainerUrl pulumi.StringInput 214 // The SAS configuration that allows DataSync to access your Azure Blob Storage. See configuration below. 215 SasConfiguration LocationAzureBlobSasConfigurationPtrInput 216 // Path segments if you want to limit your transfer to a virtual directory in the container. 217 Subdirectory pulumi.StringPtrInput 218 // Key-value pairs of resource tags to assign to the DataSync Location. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 219 Tags pulumi.StringMapInput 220 } 221 222 func (LocationAzureBlobArgs) ElementType() reflect.Type { 223 return reflect.TypeOf((*locationAzureBlobArgs)(nil)).Elem() 224 } 225 226 type LocationAzureBlobInput interface { 227 pulumi.Input 228 229 ToLocationAzureBlobOutput() LocationAzureBlobOutput 230 ToLocationAzureBlobOutputWithContext(ctx context.Context) LocationAzureBlobOutput 231 } 232 233 func (*LocationAzureBlob) ElementType() reflect.Type { 234 return reflect.TypeOf((**LocationAzureBlob)(nil)).Elem() 235 } 236 237 func (i *LocationAzureBlob) ToLocationAzureBlobOutput() LocationAzureBlobOutput { 238 return i.ToLocationAzureBlobOutputWithContext(context.Background()) 239 } 240 241 func (i *LocationAzureBlob) ToLocationAzureBlobOutputWithContext(ctx context.Context) LocationAzureBlobOutput { 242 return pulumi.ToOutputWithContext(ctx, i).(LocationAzureBlobOutput) 243 } 244 245 // LocationAzureBlobArrayInput is an input type that accepts LocationAzureBlobArray and LocationAzureBlobArrayOutput values. 246 // You can construct a concrete instance of `LocationAzureBlobArrayInput` via: 247 // 248 // LocationAzureBlobArray{ LocationAzureBlobArgs{...} } 249 type LocationAzureBlobArrayInput interface { 250 pulumi.Input 251 252 ToLocationAzureBlobArrayOutput() LocationAzureBlobArrayOutput 253 ToLocationAzureBlobArrayOutputWithContext(context.Context) LocationAzureBlobArrayOutput 254 } 255 256 type LocationAzureBlobArray []LocationAzureBlobInput 257 258 func (LocationAzureBlobArray) ElementType() reflect.Type { 259 return reflect.TypeOf((*[]*LocationAzureBlob)(nil)).Elem() 260 } 261 262 func (i LocationAzureBlobArray) ToLocationAzureBlobArrayOutput() LocationAzureBlobArrayOutput { 263 return i.ToLocationAzureBlobArrayOutputWithContext(context.Background()) 264 } 265 266 func (i LocationAzureBlobArray) ToLocationAzureBlobArrayOutputWithContext(ctx context.Context) LocationAzureBlobArrayOutput { 267 return pulumi.ToOutputWithContext(ctx, i).(LocationAzureBlobArrayOutput) 268 } 269 270 // LocationAzureBlobMapInput is an input type that accepts LocationAzureBlobMap and LocationAzureBlobMapOutput values. 271 // You can construct a concrete instance of `LocationAzureBlobMapInput` via: 272 // 273 // LocationAzureBlobMap{ "key": LocationAzureBlobArgs{...} } 274 type LocationAzureBlobMapInput interface { 275 pulumi.Input 276 277 ToLocationAzureBlobMapOutput() LocationAzureBlobMapOutput 278 ToLocationAzureBlobMapOutputWithContext(context.Context) LocationAzureBlobMapOutput 279 } 280 281 type LocationAzureBlobMap map[string]LocationAzureBlobInput 282 283 func (LocationAzureBlobMap) ElementType() reflect.Type { 284 return reflect.TypeOf((*map[string]*LocationAzureBlob)(nil)).Elem() 285 } 286 287 func (i LocationAzureBlobMap) ToLocationAzureBlobMapOutput() LocationAzureBlobMapOutput { 288 return i.ToLocationAzureBlobMapOutputWithContext(context.Background()) 289 } 290 291 func (i LocationAzureBlobMap) ToLocationAzureBlobMapOutputWithContext(ctx context.Context) LocationAzureBlobMapOutput { 292 return pulumi.ToOutputWithContext(ctx, i).(LocationAzureBlobMapOutput) 293 } 294 295 type LocationAzureBlobOutput struct{ *pulumi.OutputState } 296 297 func (LocationAzureBlobOutput) ElementType() reflect.Type { 298 return reflect.TypeOf((**LocationAzureBlob)(nil)).Elem() 299 } 300 301 func (o LocationAzureBlobOutput) ToLocationAzureBlobOutput() LocationAzureBlobOutput { 302 return o 303 } 304 305 func (o LocationAzureBlobOutput) ToLocationAzureBlobOutputWithContext(ctx context.Context) LocationAzureBlobOutput { 306 return o 307 } 308 309 // The access tier that you want your objects or files transferred into. Valid values: `HOT`, `COOL` and `ARCHIVE`. Default: `HOT`. 310 func (o LocationAzureBlobOutput) AccessTier() pulumi.StringPtrOutput { 311 return o.ApplyT(func(v *LocationAzureBlob) pulumi.StringPtrOutput { return v.AccessTier }).(pulumi.StringPtrOutput) 312 } 313 314 // A list of DataSync Agent ARNs with which this location will be associated. 315 func (o LocationAzureBlobOutput) AgentArns() pulumi.StringArrayOutput { 316 return o.ApplyT(func(v *LocationAzureBlob) pulumi.StringArrayOutput { return v.AgentArns }).(pulumi.StringArrayOutput) 317 } 318 319 // Amazon Resource Name (ARN) of the DataSync Location. 320 func (o LocationAzureBlobOutput) Arn() pulumi.StringOutput { 321 return o.ApplyT(func(v *LocationAzureBlob) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 322 } 323 324 // The authentication method DataSync uses to access your Azure Blob Storage. Valid values: `SAS`. 325 func (o LocationAzureBlobOutput) AuthenticationType() pulumi.StringOutput { 326 return o.ApplyT(func(v *LocationAzureBlob) pulumi.StringOutput { return v.AuthenticationType }).(pulumi.StringOutput) 327 } 328 329 // The type of blob that you want your objects or files to be when transferring them into Azure Blob Storage. Valid values: `BLOB`. Default: `BLOB`. 330 func (o LocationAzureBlobOutput) BlobType() pulumi.StringPtrOutput { 331 return o.ApplyT(func(v *LocationAzureBlob) pulumi.StringPtrOutput { return v.BlobType }).(pulumi.StringPtrOutput) 332 } 333 334 // The URL of the Azure Blob Storage container involved in your transfer. 335 func (o LocationAzureBlobOutput) ContainerUrl() pulumi.StringOutput { 336 return o.ApplyT(func(v *LocationAzureBlob) pulumi.StringOutput { return v.ContainerUrl }).(pulumi.StringOutput) 337 } 338 339 // The SAS configuration that allows DataSync to access your Azure Blob Storage. See configuration below. 340 func (o LocationAzureBlobOutput) SasConfiguration() LocationAzureBlobSasConfigurationPtrOutput { 341 return o.ApplyT(func(v *LocationAzureBlob) LocationAzureBlobSasConfigurationPtrOutput { return v.SasConfiguration }).(LocationAzureBlobSasConfigurationPtrOutput) 342 } 343 344 // Path segments if you want to limit your transfer to a virtual directory in the container. 345 func (o LocationAzureBlobOutput) Subdirectory() pulumi.StringOutput { 346 return o.ApplyT(func(v *LocationAzureBlob) pulumi.StringOutput { return v.Subdirectory }).(pulumi.StringOutput) 347 } 348 349 // Key-value pairs of resource tags to assign to the DataSync Location. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 350 func (o LocationAzureBlobOutput) Tags() pulumi.StringMapOutput { 351 return o.ApplyT(func(v *LocationAzureBlob) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 352 } 353 354 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 355 // 356 // Deprecated: Please use `tags` instead. 357 func (o LocationAzureBlobOutput) TagsAll() pulumi.StringMapOutput { 358 return o.ApplyT(func(v *LocationAzureBlob) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 359 } 360 361 func (o LocationAzureBlobOutput) Uri() pulumi.StringOutput { 362 return o.ApplyT(func(v *LocationAzureBlob) pulumi.StringOutput { return v.Uri }).(pulumi.StringOutput) 363 } 364 365 type LocationAzureBlobArrayOutput struct{ *pulumi.OutputState } 366 367 func (LocationAzureBlobArrayOutput) ElementType() reflect.Type { 368 return reflect.TypeOf((*[]*LocationAzureBlob)(nil)).Elem() 369 } 370 371 func (o LocationAzureBlobArrayOutput) ToLocationAzureBlobArrayOutput() LocationAzureBlobArrayOutput { 372 return o 373 } 374 375 func (o LocationAzureBlobArrayOutput) ToLocationAzureBlobArrayOutputWithContext(ctx context.Context) LocationAzureBlobArrayOutput { 376 return o 377 } 378 379 func (o LocationAzureBlobArrayOutput) Index(i pulumi.IntInput) LocationAzureBlobOutput { 380 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LocationAzureBlob { 381 return vs[0].([]*LocationAzureBlob)[vs[1].(int)] 382 }).(LocationAzureBlobOutput) 383 } 384 385 type LocationAzureBlobMapOutput struct{ *pulumi.OutputState } 386 387 func (LocationAzureBlobMapOutput) ElementType() reflect.Type { 388 return reflect.TypeOf((*map[string]*LocationAzureBlob)(nil)).Elem() 389 } 390 391 func (o LocationAzureBlobMapOutput) ToLocationAzureBlobMapOutput() LocationAzureBlobMapOutput { 392 return o 393 } 394 395 func (o LocationAzureBlobMapOutput) ToLocationAzureBlobMapOutputWithContext(ctx context.Context) LocationAzureBlobMapOutput { 396 return o 397 } 398 399 func (o LocationAzureBlobMapOutput) MapIndex(k pulumi.StringInput) LocationAzureBlobOutput { 400 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LocationAzureBlob { 401 return vs[0].(map[string]*LocationAzureBlob)[vs[1].(string)] 402 }).(LocationAzureBlobOutput) 403 } 404 405 func init() { 406 pulumi.RegisterInputType(reflect.TypeOf((*LocationAzureBlobInput)(nil)).Elem(), &LocationAzureBlob{}) 407 pulumi.RegisterInputType(reflect.TypeOf((*LocationAzureBlobArrayInput)(nil)).Elem(), LocationAzureBlobArray{}) 408 pulumi.RegisterInputType(reflect.TypeOf((*LocationAzureBlobMapInput)(nil)).Elem(), LocationAzureBlobMap{}) 409 pulumi.RegisterOutputType(LocationAzureBlobOutput{}) 410 pulumi.RegisterOutputType(LocationAzureBlobArrayOutput{}) 411 pulumi.RegisterOutputType(LocationAzureBlobMapOutput{}) 412 }