Skip to content

Commit

Permalink
feat(client-marketplace-catalog): AWS Marketplace Catalog API now sup…
Browse files Browse the repository at this point in the history
…ports setting intent on requests
  • Loading branch information
awstools committed Feb 13, 2024
1 parent 28a14d4 commit a1c879d
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface BatchDescribeEntitiesCommandOutput extends BatchDescribeEntitie

/**
* @public
* <p>Returns metadata and content for multiple entities.</p>
* <p>Returns metadata and content for multiple entities. This is the Batch version of the <code>DescribeEntity</code> API and uses the same IAM permission action as <code>DescribeEntity</code> API.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export interface DescribeChangeSetCommandOutput extends DescribeChangeSetRespons
* // ChangeSetId: "STRING_VALUE",
* // ChangeSetArn: "STRING_VALUE",
* // ChangeSetName: "STRING_VALUE",
* // Intent: "VALIDATE" || "APPLY",
* // StartTime: "STRING_VALUE",
* // EndTime: "STRING_VALUE",
* // Status: "PREPARING" || "APPLYING" || "SUCCEEDED" || "CANCELLED" || "FAILED",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export interface StartChangeSetCommandOutput extends StartChangeSetResponse, __M
* Value: "STRING_VALUE", // required
* },
* ],
* Intent: "VALIDATE" || "APPLY",
* };
* const command = new StartChangeSetCommand(input);
* const response = await client.send(command);
Expand Down
43 changes: 36 additions & 7 deletions clients/client-marketplace-catalog/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export interface AmiProductVisibilityFilter {

/**
* @public
* <p>Object containing all the filter fields for AMI products. Client can add a maximum of 8
* <p>Object containing all the filter fields for AMI products. Client can add only one wildcard filter and a maximum of 8
* filters in a single <code>ListEntities</code> request.</p>
*/
export interface AmiProductFilters {
Expand Down Expand Up @@ -598,6 +598,20 @@ export const FailureCode = {
*/
export type FailureCode = (typeof FailureCode)[keyof typeof FailureCode];

/**
* @public
* @enum
*/
export const Intent = {
APPLY: "APPLY",
VALIDATE: "VALIDATE",
} as const;

/**
* @public
*/
export type Intent = (typeof Intent)[keyof typeof Intent];

/**
* @public
* @enum
Expand Down Expand Up @@ -639,6 +653,13 @@ export interface DescribeChangeSetResponse {
*/
ChangeSetName?: string;

/**
* @public
* <p>The optional intent provided in the <code>StartChangeSet</code> request. If you do not
* provide an intent, <code>APPLY</code> is set by default.</p>
*/
Intent?: Intent;

/**
* @public
* <p>The date and time, in ISO 8601 format (2018-02-27T13:45:22Z), the request started.
Expand Down Expand Up @@ -1090,7 +1111,7 @@ export interface ContainerProductVisibilityFilter {

/**
* @public
* <p>Object containing all the filter fields for container products. Client can add a maximum of 8 filters in a single <code>ListEntities</code> request.</p>
* <p>Object containing all the filter fields for container products. Client can add only one wildcard filter and a maximum of 8 filters in a single <code>ListEntities</code> request.</p>
*/
export interface ContainerProductFilters {
/**
Expand Down Expand Up @@ -1210,7 +1231,7 @@ export interface DataProductVisibilityFilter {

/**
* @public
* <p>Object containing all the filter fields for data products. Client can add a maximum of 8 filters in a single <code>ListEntities</code> request.</p>
* <p>Object containing all the filter fields for data products. Client can add only one wildcard filter and a maximum of 8 filters in a single <code>ListEntities</code> request.</p>
*/
export interface DataProductFilters {
/**
Expand Down Expand Up @@ -1438,7 +1459,7 @@ export interface OfferTargetingFilter {

/**
* @public
* <p>A filter for offers entity.</p>
* <p>Object containing all the filter fields for offers entity. Client can add only one wildcard filter and a maximum of 8 filters in a single <code>ListEntities</code> request.</p>
*/
export interface OfferFilters {
/**
Expand Down Expand Up @@ -1778,7 +1799,7 @@ export interface ResaleAuthorizationStatusFilter {

/**
* @public
* <p>A filter for ResaleAuthorization entity.</p>
* <p>Object containing all the filter fields for resale authorization entity. Client can add only one wildcard filter and a maximum of 8 filters in a single <code>ListEntities</code> request.</p>
*/
export interface ResaleAuthorizationFilters {
/**
Expand Down Expand Up @@ -1951,8 +1972,7 @@ export interface SaaSProductVisibilityFilter {

/**
* @public
* <p>Object containing all the filter fields for SaaS products. Client can add a maximum of
* 8 filters in a single <code>ListEntities</code> request.</p>
* <p>Object containing all the filter fields for SaaS products. Client can add only one wildcard filter and a maximum of 8 filters in a single <code>ListEntities</code> request.</p>
*/
export interface SaaSProductFilters {
/**
Expand Down Expand Up @@ -2984,6 +3004,15 @@ export interface StartChangeSetRequest {
* <code>ChangeSetTags</code> property.</p>
*/
ChangeSetTags?: Tag[];

/**
* @public
* <p>The intent related to the request. The default is <code>APPLY</code>.
* To test your request before applying changes to your entities, use <code>VALIDATE</code>.
* This feature is currently available for adding versions to single-AMI products. For more information, see
* <a href="https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/ami-products.html#ami-add-version">Add a new version</a>.</p>
*/
Intent?: Intent;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ export const se_StartChangeSetCommand = async (
ChangeSetName: [],
ChangeSetTags: (_) => _json(_),
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
Intent: [],
})
);
b.m("POST").h(headers).b(body);
Expand Down Expand Up @@ -503,6 +504,7 @@ export const de_DescribeChangeSetCommand = async (
EndTime: __expectString,
FailureCode: __expectString,
FailureDescription: __expectString,
Intent: __expectString,
StartTime: __expectString,
Status: __expectString,
});
Expand Down
43 changes: 36 additions & 7 deletions codegen/sdk-codegen/aws-models/marketplace-catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@
}
},
"traits": {
"smithy.api#documentation": "<p>Object containing all the filter fields for AMI products. Client can add a maximum of 8\n filters in a single <code>ListEntities</code> request.</p>"
"smithy.api#documentation": "<p>Object containing all the filter fields for AMI products. Client can add only one wildcard filter and a maximum of 8\n filters in a single <code>ListEntities</code> request.</p>"
}
},
"com.amazonaws.marketplacecatalog#AmiProductLastModifiedDateFilter": {
Expand Down Expand Up @@ -1031,7 +1031,7 @@
}
],
"traits": {
"smithy.api#documentation": "<p>Returns metadata and content for multiple entities.</p>",
"smithy.api#documentation": "<p>Returns metadata and content for multiple entities. This is the Batch version of the <code>DescribeEntity</code> API and uses the same IAM permission action as <code>DescribeEntity</code> API.</p>",
"smithy.api#http": {
"method": "POST",
"uri": "/BatchDescribeEntities",
Expand Down Expand Up @@ -1503,7 +1503,7 @@
}
},
"traits": {
"smithy.api#documentation": "<p>Object containing all the filter fields for container products. Client can add a maximum of 8 filters in a single <code>ListEntities</code> request.</p>"
"smithy.api#documentation": "<p>Object containing all the filter fields for container products. Client can add only one wildcard filter and a maximum of 8 filters in a single <code>ListEntities</code> request.</p>"
}
},
"com.amazonaws.marketplacecatalog#ContainerProductLastModifiedDateFilter": {
Expand Down Expand Up @@ -1771,7 +1771,7 @@
}
},
"traits": {
"smithy.api#documentation": "<p>Object containing all the filter fields for data products. Client can add a maximum of 8 filters in a single <code>ListEntities</code> request.</p>"
"smithy.api#documentation": "<p>Object containing all the filter fields for data products. Client can add only one wildcard filter and a maximum of 8 filters in a single <code>ListEntities</code> request.</p>"
}
},
"com.amazonaws.marketplacecatalog#DataProductLastModifiedDateFilter": {
Expand Down Expand Up @@ -2126,6 +2126,12 @@
"smithy.api#documentation": "<p>The optional name provided in the <code>StartChangeSet</code> request. If you do not\n provide a name, one is set by default.</p>"
}
},
"Intent": {
"target": "com.amazonaws.marketplacecatalog#Intent",
"traits": {
"smithy.api#documentation": "<p>The optional intent provided in the <code>StartChangeSet</code> request. If you do not\n provide an intent, <code>APPLY</code> is set by default.</p>"
}
},
"StartTime": {
"target": "com.amazonaws.marketplacecatalog#DateTimeISO8601",
"traits": {
Expand Down Expand Up @@ -2776,6 +2782,23 @@
"smithy.api#pattern": "^[\\w\\-@]+$"
}
},
"com.amazonaws.marketplacecatalog#Intent": {
"type": "enum",
"members": {
"VALIDATE": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "VALIDATE"
}
},
"APPLY": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "APPLY"
}
}
}
},
"com.amazonaws.marketplacecatalog#InternalServiceException": {
"type": "structure",
"members": {
Expand Down Expand Up @@ -3294,7 +3317,7 @@
}
},
"traits": {
"smithy.api#documentation": "<p>A filter for offers entity.</p>"
"smithy.api#documentation": "<p>Object containing all the filter fields for offers entity. Client can add only one wildcard filter and a maximum of 8 filters in a single <code>ListEntities</code> request.</p>"
}
},
"com.amazonaws.marketplacecatalog#OfferLastModifiedDateFilter": {
Expand Down Expand Up @@ -3997,7 +4020,7 @@
}
},
"traits": {
"smithy.api#documentation": "<p>A filter for ResaleAuthorization entity.</p>"
"smithy.api#documentation": "<p>Object containing all the filter fields for resale authorization entity. Client can add only one wildcard filter and a maximum of 8 filters in a single <code>ListEntities</code> request.</p>"
}
},
"com.amazonaws.marketplacecatalog#ResaleAuthorizationLastModifiedDateFilter": {
Expand Down Expand Up @@ -4800,7 +4823,7 @@
}
},
"traits": {
"smithy.api#documentation": "<p>Object containing all the filter fields for SaaS products. Client can add a maximum of\n 8 filters in a single <code>ListEntities</code> request.</p>"
"smithy.api#documentation": "<p>Object containing all the filter fields for SaaS products. Client can add only one wildcard filter and a maximum of 8 filters in a single <code>ListEntities</code> request.</p>"
}
},
"com.amazonaws.marketplacecatalog#SaaSProductLastModifiedDateFilter": {
Expand Down Expand Up @@ -5138,6 +5161,12 @@
"traits": {
"smithy.api#documentation": "<p>A list of objects specifying each key name and value for the\n <code>ChangeSetTags</code> property.</p>"
}
},
"Intent": {
"target": "com.amazonaws.marketplacecatalog#Intent",
"traits": {
"smithy.api#documentation": "<p>The intent related to the request. The default is <code>APPLY</code>.\n To test your request before applying changes to your entities, use <code>VALIDATE</code>.\n This feature is currently available for adding versions to single-AMI products. For more information, see\n <a href=\"https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/ami-products.html#ami-add-version\">Add a new version</a>.</p>"
}
}
},
"traits": {
Expand Down

0 comments on commit a1c879d

Please sign in to comment.