import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an AWS DevOps Agent Asset. * * > **Note:** `content` and `metadata` are inputs retained in Terraform state. Terraform does not detect out-of-band changes to these inputs. `metadataActual` exposes the current metadata returned by AWS. Import cannot recover the original content or metadata input. * * > **Note:** Updating ZIP content replaces all files in the asset, including files managed separately. Updating single-file content adds or replaces that file without deleting other files. Updating source URL content re-syncs from the original source; an unchanged URL does not trigger a re-sync. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.devopsagent.AgentSpace("example", {name: "example"}); * const exampleAsset = new aws.devopsagent.Asset("example", { * content: { * file: { * body: { * text: "Follow the operational runbook.", * }, * path: "AGENTS.md", * }, * }, * agentSpaceId: example.agentSpaceId, * assetType: "agents_md", * metadata: JSON.stringify({ * agent_type: "GENERIC", * }), * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `agentSpaceId` (String) Identifier of the Agent Space containing the asset. * * `assetId` (String) Identifier of the asset. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import an asset using its Agent Space ID and asset ID separated by a comma. For example: * * ```sh * $ pulumi import aws:devopsagent/asset:Asset example 12345678-1234-1234-1234-123456789012,87654321-4321-4321-4321-210987654321 * ``` */ export declare class Asset extends pulumi.CustomResource { /** * Get an existing Asset resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: AssetState, opts?: pulumi.CustomResourceOptions): Asset; /** * Check whether an existing Asset resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: AssetState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of Asset. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Asset; /** * Identifier of the Agent Space containing the asset. Changing this value requires replacement. */ readonly agentSpaceId: pulumi.Output; /** * Identifier of the asset. */ readonly assetId: pulumi.Output; /** * Type of asset. Changing this value requires replacement. See [Managing assets](https://docs.aws.amazon.com/devopsagent/latest/userguide/about-aws-devops-agent-managing-assets.html) for supported types and their metadata requirements. */ readonly assetType: pulumi.Output; /** * Content to upload. Exactly one block is required. See `content` Block below. * * The following arguments are optional: */ readonly content: pulumi.Output; /** * Creation timestamp in RFC 3339 format. */ readonly createdAt: pulumi.Output; /** * JSON document describing the asset. Required metadata fields depend on `assetType`. Updates replace supplied top-level fields and retain omitted fields in AWS; removing a field from this document does not delete it from AWS. Changes to metadata alone do not re-upload content. */ readonly metadata: pulumi.Output; /** * Full JSON metadata returned by AWS, including retained fields and service-provided defaults. */ readonly metadataActual: pulumi.Output; /** * Region where this resource will be managed. Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Last update timestamp in RFC 3339 format. */ readonly updatedAt: pulumi.Output; /** * Current asset version. */ readonly version: pulumi.Output; /** * Create a Asset resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: AssetArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Asset resources. */ export interface AssetState { /** * Identifier of the Agent Space containing the asset. Changing this value requires replacement. */ agentSpaceId?: pulumi.Input; /** * Identifier of the asset. */ assetId?: pulumi.Input; /** * Type of asset. Changing this value requires replacement. See [Managing assets](https://docs.aws.amazon.com/devopsagent/latest/userguide/about-aws-devops-agent-managing-assets.html) for supported types and their metadata requirements. */ assetType?: pulumi.Input; /** * Content to upload. Exactly one block is required. See `content` Block below. * * The following arguments are optional: */ content?: pulumi.Input; /** * Creation timestamp in RFC 3339 format. */ createdAt?: pulumi.Input; /** * JSON document describing the asset. Required metadata fields depend on `assetType`. Updates replace supplied top-level fields and retain omitted fields in AWS; removing a field from this document does not delete it from AWS. Changes to metadata alone do not re-upload content. */ metadata?: pulumi.Input; /** * Full JSON metadata returned by AWS, including retained fields and service-provided defaults. */ metadataActual?: pulumi.Input; /** * Region where this resource will be managed. Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Last update timestamp in RFC 3339 format. */ updatedAt?: pulumi.Input; /** * Current asset version. */ version?: pulumi.Input; } /** * The set of arguments for constructing a Asset resource. */ export interface AssetArgs { /** * Identifier of the Agent Space containing the asset. Changing this value requires replacement. */ agentSpaceId: pulumi.Input; /** * Type of asset. Changing this value requires replacement. See [Managing assets](https://docs.aws.amazon.com/devopsagent/latest/userguide/about-aws-devops-agent-managing-assets.html) for supported types and their metadata requirements. */ assetType: pulumi.Input; /** * Content to upload. Exactly one block is required. See `content` Block below. * * The following arguments are optional: */ content: pulumi.Input; /** * JSON document describing the asset. Required metadata fields depend on `assetType`. Updates replace supplied top-level fields and retain omitted fields in AWS; removing a field from this document does not delete it from AWS. Changes to metadata alone do not re-upload content. */ metadata?: pulumi.Input; /** * Region where this resource will be managed. Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; } //# sourceMappingURL=asset.d.ts.map