These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi
azure-native.storage.Blob
Explore with Pulumi AI
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi
Manages a Blob within a Storage Container.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:storage:Blob myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/blobs/{blobName}
Create Blob Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Blob(name: string, args: BlobArgs, opts?: CustomResourceOptions);
@overload
def Blob(resource_name: str,
args: BlobArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Blob(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_name: Optional[str] = None,
container_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
access_tier: Optional[BlobAccessTier] = None,
blob_name: Optional[str] = None,
content_md5: Optional[str] = None,
content_type: Optional[str] = None,
metadata: Optional[Mapping[str, str]] = None,
source: Optional[Union[pulumi.Asset, pulumi.Archive]] = None,
type: Optional[BlobType] = None)
func NewBlob(ctx *Context, name string, args BlobArgs, opts ...ResourceOption) (*Blob, error)
public Blob(string name, BlobArgs args, CustomResourceOptions? opts = null)
type: azure-native:storage:Blob
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args BlobArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args BlobArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args BlobArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BlobArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BlobArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var blobResource = new AzureNative.Storage.Blob("blobResource", new()
{
AccountName = "string",
ContainerName = "string",
ResourceGroupName = "string",
AccessTier = "Hot",
BlobName = "string",
ContentMd5 = "string",
ContentType = "string",
Metadata =
{
{ "string", "string" },
},
Source = new StringAsset("content"),
Type = "Block",
});
example, err := storage.NewBlob(ctx, "blobResource", &storage.BlobArgs{
AccountName: "string",
ContainerName: "string",
ResourceGroupName: "string",
AccessTier: "Hot",
BlobName: "string",
ContentMd5: "string",
ContentType: "string",
Metadata: map[string]interface{}{
"string": "string",
},
Source: pulumi.NewStringAsset("content"),
Type: "Block",
})
var blobResource = new Blob("blobResource", BlobArgs.builder()
.accountName("string")
.containerName("string")
.resourceGroupName("string")
.accessTier("Hot")
.blobName("string")
.contentMd5("string")
.contentType("string")
.metadata(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.source(new StringAsset("content"))
.type("Block")
.build());
blob_resource = azure_native.storage.Blob("blobResource",
account_name=string,
container_name=string,
resource_group_name=string,
access_tier=Hot,
blob_name=string,
content_md5=string,
content_type=string,
metadata={
string: string,
},
source=pulumi.StringAsset(content),
type=Block)
const blobResource = new azure_native.storage.Blob("blobResource", {
accountName: "string",
containerName: "string",
resourceGroupName: "string",
accessTier: "Hot",
blobName: "string",
contentMd5: "string",
contentType: "string",
metadata: {
string: "string",
},
source: new pulumi.asset.StringAsset("content"),
type: "Block",
});
type: azure-native:storage:Blob
properties:
accessTier: Hot
accountName: string
blobName: string
containerName: string
contentMd5: string
contentType: string
metadata:
string: string
resourceGroupName: string
source:
fn::StringAsset: content
type: Block
Blob Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Blob resource accepts the following input properties:
- Account
Name string - Specifies the storage account in which to create the storage container.
- Container
Name string - The name of the storage container in which this blob should be created.
- Resource
Group stringName - The name of the resource group within the user's subscription.
- Access
Tier Pulumi.Azure Native. Storage. Blob Access Tier - The access tier of the storage blob.
- Blob
Name string - The name of the storage blob. Must be unique within the storage container the blob is located.
- Content
Md5 string - The MD5 sum of the blob contents. Cannot be defined if blob type is Append.
- Content
Type string - The content type of the storage blob. Defaults to
application/octet-stream
. - Metadata Dictionary<string, string>
- A map of custom blob metadata.
- Source
Asset
Or Archive - An asset to copy to the blob contents. This field cannot be specified for Append blobs.
- Type
Pulumi.
Azure Native. Storage. Blob Type - The type of the storage blob to be created. Defaults to 'Block'.
- Account
Name string - Specifies the storage account in which to create the storage container.
- Container
Name string - The name of the storage container in which this blob should be created.
- Resource
Group stringName - The name of the resource group within the user's subscription.
- Access
Tier BlobAccess Tier - The access tier of the storage blob.
- Blob
Name string - The name of the storage blob. Must be unique within the storage container the blob is located.
- Content
Md5 string - The MD5 sum of the blob contents. Cannot be defined if blob type is Append.
- Content
Type string - The content type of the storage blob. Defaults to
application/octet-stream
. - Metadata map[string]string
- A map of custom blob metadata.
- Source
pulumi.
Asset Or Archive - An asset to copy to the blob contents. This field cannot be specified for Append blobs.
- Type
Blob
Type - The type of the storage blob to be created. Defaults to 'Block'.
- account
Name String - Specifies the storage account in which to create the storage container.
- container
Name String - The name of the storage container in which this blob should be created.
- resource
Group StringName - The name of the resource group within the user's subscription.
- access
Tier BlobAccess Tier - The access tier of the storage blob.
- blob
Name String - The name of the storage blob. Must be unique within the storage container the blob is located.
- content
Md5 String - The MD5 sum of the blob contents. Cannot be defined if blob type is Append.
- content
Type String - The content type of the storage blob. Defaults to
application/octet-stream
. - metadata Map<String,String>
- A map of custom blob metadata.
- source
Asset
Or Archive - An asset to copy to the blob contents. This field cannot be specified for Append blobs.
- type
Blob
Type - The type of the storage blob to be created. Defaults to 'Block'.
- account
Name string - Specifies the storage account in which to create the storage container.
- container
Name string - The name of the storage container in which this blob should be created.
- resource
Group stringName - The name of the resource group within the user's subscription.
- access
Tier BlobAccess Tier - The access tier of the storage blob.
- blob
Name string - The name of the storage blob. Must be unique within the storage container the blob is located.
- content
Md5 string - The MD5 sum of the blob contents. Cannot be defined if blob type is Append.
- content
Type string - The content type of the storage blob. Defaults to
application/octet-stream
. - metadata {[key: string]: string}
- A map of custom blob metadata.
- source
pulumi.asset.
Asset | pulumi.asset. Archive - An asset to copy to the blob contents. This field cannot be specified for Append blobs.
- type
Blob
Type - The type of the storage blob to be created. Defaults to 'Block'.
- account_
name str - Specifies the storage account in which to create the storage container.
- container_
name str - The name of the storage container in which this blob should be created.
- resource_
group_ strname - The name of the resource group within the user's subscription.
- access_
tier BlobAccess Tier - The access tier of the storage blob.
- blob_
name str - The name of the storage blob. Must be unique within the storage container the blob is located.
- content_
md5 str - The MD5 sum of the blob contents. Cannot be defined if blob type is Append.
- content_
type str - The content type of the storage blob. Defaults to
application/octet-stream
. - metadata Mapping[str, str]
- A map of custom blob metadata.
- source
Union[pulumi.
Asset, pulumi. Archive] - An asset to copy to the blob contents. This field cannot be specified for Append blobs.
- type
Blob
Type - The type of the storage blob to be created. Defaults to 'Block'.
- account
Name String - Specifies the storage account in which to create the storage container.
- container
Name String - The name of the storage container in which this blob should be created.
- resource
Group StringName - The name of the resource group within the user's subscription.
- access
Tier "Hot" | "Cool" | "Archive" - The access tier of the storage blob.
- blob
Name String - The name of the storage blob. Must be unique within the storage container the blob is located.
- content
Md5 String - The MD5 sum of the blob contents. Cannot be defined if blob type is Append.
- content
Type String - The content type of the storage blob. Defaults to
application/octet-stream
. - metadata Map<String>
- A map of custom blob metadata.
- source Asset
- An asset to copy to the blob contents. This field cannot be specified for Append blobs.
- type "Block" | "Append"
- The type of the storage blob to be created. Defaults to 'Block'.
Outputs
All input properties are implicitly available as output properties. Additionally, the Blob resource produces the following output properties:
Supporting Types
BlobAccessTier, BlobAccessTierArgs
- Hot
- HotOptimized for storing data that is accessed frequently.
- Cool
- CoolOptimized for storing data that is infrequently accessed and stored for at least 30 days.
- Archive
- ArchiveOptimized for storing data that is rarely accessed and stored for at least 180 days with flexible latency requirements, on the order of hours.
- Blob
Access Tier Hot - HotOptimized for storing data that is accessed frequently.
- Blob
Access Tier Cool - CoolOptimized for storing data that is infrequently accessed and stored for at least 30 days.
- Blob
Access Tier Archive - ArchiveOptimized for storing data that is rarely accessed and stored for at least 180 days with flexible latency requirements, on the order of hours.
- Hot
- HotOptimized for storing data that is accessed frequently.
- Cool
- CoolOptimized for storing data that is infrequently accessed and stored for at least 30 days.
- Archive
- ArchiveOptimized for storing data that is rarely accessed and stored for at least 180 days with flexible latency requirements, on the order of hours.
- Hot
- HotOptimized for storing data that is accessed frequently.
- Cool
- CoolOptimized for storing data that is infrequently accessed and stored for at least 30 days.
- Archive
- ArchiveOptimized for storing data that is rarely accessed and stored for at least 180 days with flexible latency requirements, on the order of hours.
- HOT
- HotOptimized for storing data that is accessed frequently.
- COOL
- CoolOptimized for storing data that is infrequently accessed and stored for at least 30 days.
- ARCHIVE
- ArchiveOptimized for storing data that is rarely accessed and stored for at least 180 days with flexible latency requirements, on the order of hours.
- "Hot"
- HotOptimized for storing data that is accessed frequently.
- "Cool"
- CoolOptimized for storing data that is infrequently accessed and stored for at least 30 days.
- "Archive"
- ArchiveOptimized for storing data that is rarely accessed and stored for at least 180 days with flexible latency requirements, on the order of hours.
BlobType, BlobTypeArgs
- Block
- BlockBlock blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually.
- Append
- AppendAppend blobs are made up of blocks like block blobs, but are optimized for append operations.
- Blob
Type Block - BlockBlock blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually.
- Blob
Type Append - AppendAppend blobs are made up of blocks like block blobs, but are optimized for append operations.
- Block
- BlockBlock blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually.
- Append
- AppendAppend blobs are made up of blocks like block blobs, but are optimized for append operations.
- Block
- BlockBlock blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually.
- Append
- AppendAppend blobs are made up of blocks like block blobs, but are optimized for append operations.
- BLOCK
- BlockBlock blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually.
- APPEND
- AppendAppend blobs are made up of blocks like block blobs, but are optimized for append operations.
- "Block"
- BlockBlock blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually.
- "Append"
- AppendAppend blobs are made up of blocks like block blobs, but are optimized for append operations.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi