diff --git a/generated/aws_accessanalyzer_api/README.md b/generated/aws_accessanalyzer_api/README.md index 19f2de2bf..1b84e6e51 100644 --- a/generated/aws_accessanalyzer_api/README.md +++ b/generated/aws_accessanalyzer_api/README.md @@ -3,18 +3,21 @@ **Generated Dart library from API specification** *About the service:* -AWS IAM Access Analyzer helps identify potential resource-access risks by -enabling you to identify any policies that grant access to an external -principal. It does this by using logic-based reasoning to analyze -resource-based policies in your AWS environment. An external principal can -be another AWS account, a root user, an IAM user or role, a federated user, -an AWS service, or an anonymous user. This guide describes the AWS IAM +Identity and Access Management Access Analyzer helps identify potential +resource-access risks by enabling you to identify any policies that grant +access to an external principal. It does this by using logic-based reasoning +to analyze resource-based policies in your Amazon Web Services environment. +An external principal can be another Amazon Web Services account, a root +user, an IAM user or role, a federated user, an Amazon Web Services service, +or an anonymous user. You can also use IAM Access Analyzer to preview and +validate public and cross-account access to your resources before deploying +permissions changes. This guide describes the Identity and Access Management Access Analyzer operations that you can call programmatically. For general -information about Access Analyzer, see AWS -IAM Access Analyzer in the IAM User Guide. +information about IAM Access Analyzer, see Identity +and Access Management Access Analyzer in the IAM User Guide. -To start using Access Analyzer, you first need to create an analyzer. +To start using IAM Access Analyzer, you first need to create an analyzer. ## Links diff --git a/generated/aws_accessanalyzer_api/lib/accessanalyzer-2019-11-01.dart b/generated/aws_accessanalyzer_api/lib/accessanalyzer-2019-11-01.dart index eb9bc92bc..cc847855d 100644 --- a/generated/aws_accessanalyzer_api/lib/accessanalyzer-2019-11-01.dart +++ b/generated/aws_accessanalyzer_api/lib/accessanalyzer-2019-11-01.dart @@ -18,18 +18,21 @@ import 'package:shared_aws_api/shared.dart' export 'package:shared_aws_api/shared.dart' show AwsClientCredentials; -/// AWS IAM Access Analyzer helps identify potential resource-access risks by -/// enabling you to identify any policies that grant access to an external -/// principal. It does this by using logic-based reasoning to analyze -/// resource-based policies in your AWS environment. An external principal can -/// be another AWS account, a root user, an IAM user or role, a federated user, -/// an AWS service, or an anonymous user. This guide describes the AWS IAM +/// Identity and Access Management Access Analyzer helps identify potential +/// resource-access risks by enabling you to identify any policies that grant +/// access to an external principal. It does this by using logic-based reasoning +/// to analyze resource-based policies in your Amazon Web Services environment. +/// An external principal can be another Amazon Web Services account, a root +/// user, an IAM user or role, a federated user, an Amazon Web Services service, +/// or an anonymous user. You can also use IAM Access Analyzer to preview and +/// validate public and cross-account access to your resources before deploying +/// permissions changes. This guide describes the Identity and Access Management /// Access Analyzer operations that you can call programmatically. For general -/// information about Access Analyzer, see AWS -/// IAM Access Analyzer in the IAM User Guide. +/// information about IAM Access Analyzer, see Identity +/// and Access Management Access Analyzer in the IAM User Guide. /// -/// To start using Access Analyzer, you first need to create an analyzer. +/// To start using IAM Access Analyzer, you first need to create an analyzer. class AccessAnalyzer { final _s.RestJsonProtocol _protocol; AccessAnalyzer({ @@ -94,6 +97,75 @@ class AccessAnalyzer { ); } + /// Cancels the requested policy generation. + /// + /// May throw [ValidationException]. + /// May throw [InternalServerException]. + /// May throw [ThrottlingException]. + /// May throw [AccessDeniedException]. + /// + /// Parameter [jobId] : + /// The JobId that is returned by the + /// StartPolicyGeneration operation. The JobId can + /// be used with GetGeneratedPolicy to retrieve the generated + /// policies or used with CancelPolicyGeneration to cancel the + /// policy generation request. + Future cancelPolicyGeneration({ + required String jobId, + }) async { + final response = await _protocol.send( + payload: null, + method: 'PUT', + requestUri: '/policy/generation/${Uri.encodeComponent(jobId)}', + exceptionFnMap: _exceptionFns, + ); + } + + /// Creates an access preview that allows you to preview IAM Access Analyzer + /// findings for your resource before deploying resource permissions. + /// + /// May throw [ResourceNotFoundException]. + /// May throw [ConflictException]. + /// May throw [ValidationException]. + /// May throw [InternalServerException]. + /// May throw [ServiceQuotaExceededException]. + /// May throw [ThrottlingException]. + /// May throw [AccessDeniedException]. + /// + /// Parameter [analyzerArn] : + /// The ARN + /// of the account analyzer used to generate the access preview. You can + /// only create an access preview for analyzers with an Account + /// type and Active status. + /// + /// Parameter [configurations] : + /// Access control configuration for your resource that is used to generate + /// the access preview. The access preview includes findings for external + /// access allowed to the resource with the proposed access control + /// configuration. The configuration must contain exactly one element. + /// + /// Parameter [clientToken] : + /// A client token. + Future createAccessPreview({ + required String analyzerArn, + required Map configurations, + String? clientToken, + }) async { + final $payload = { + 'analyzerArn': analyzerArn, + 'configurations': configurations, + 'clientToken': clientToken ?? _s.generateIdempotencyToken(), + }; + final response = await _protocol.send( + payload: $payload, + method: 'PUT', + requestUri: '/access-preview', + exceptionFnMap: _exceptionFns, + ); + return CreateAccessPreviewResponse.fromJson(response); + } + /// Creates an analyzer for your account. /// /// May throw [ConflictException]. @@ -107,8 +179,9 @@ class AccessAnalyzer { /// The name of the analyzer to create. /// /// Parameter [type] : - /// The type of analyzer to create. Only ACCOUNT analyzers are supported. You - /// can create only one analyzer per account per Region. + /// The type of analyzer to create. Only ACCOUNT and ORGANIZATION analyzers + /// are supported. You can create only one analyzer per account per Region. + /// You can create up to 5 analyzers per organization per Region. /// /// Parameter [archiveRules] : /// Specifies the archive rules to add for the analyzer. Archive rules @@ -147,6 +220,11 @@ class AccessAnalyzer { /// automatically archive new findings that meet the criteria you define when /// you create the rule. /// + /// To learn about filter keys that you can use to create an archive rule, see + /// IAM + /// Access Analyzer filter keys in the IAM User Guide. + /// /// May throw [ResourceNotFoundException]. /// May throw [ConflictException]. /// May throw [ValidationException]. @@ -185,10 +263,10 @@ class AccessAnalyzer { ); } - /// Deletes the specified analyzer. When you delete an analyzer, Access - /// Analyzer is disabled for the account in the current or specific Region. - /// All findings that were generated by the analyzer are deleted. You cannot - /// undo this action. + /// Deletes the specified analyzer. When you delete an analyzer, IAM Access + /// Analyzer is disabled for the account or organization in the current or + /// specific Region. All findings that were generated by the analyzer are + /// deleted. You cannot undo this action. /// /// May throw [ResourceNotFoundException]. /// May throw [ValidationException]. @@ -251,6 +329,38 @@ class AccessAnalyzer { ); } + /// Retrieves information about an access preview for the specified analyzer. + /// + /// May throw [ResourceNotFoundException]. + /// May throw [ValidationException]. + /// May throw [InternalServerException]. + /// May throw [ThrottlingException]. + /// May throw [AccessDeniedException]. + /// + /// Parameter [accessPreviewId] : + /// The unique ID for the access preview. + /// + /// Parameter [analyzerArn] : + /// The ARN + /// of the analyzer used to generate the access preview. + Future getAccessPreview({ + required String accessPreviewId, + required String analyzerArn, + }) async { + final $query = >{ + 'analyzerArn': [analyzerArn], + }; + final response = await _protocol.send( + payload: null, + method: 'GET', + requestUri: '/access-preview/${Uri.encodeComponent(accessPreviewId)}', + queryParams: $query, + exceptionFnMap: _exceptionFns, + ); + return GetAccessPreviewResponse.fromJson(response); + } + /// Retrieves information about a resource that was analyzed. /// /// May throw [ResourceNotFoundException]. @@ -260,7 +370,9 @@ class AccessAnalyzer { /// May throw [AccessDeniedException]. /// /// Parameter [analyzerArn] : - /// The ARN of the analyzer to retrieve information from. + /// The ARN + /// of the analyzer to retrieve information from. /// /// Parameter [resourceArn] : /// The ARN of the resource to retrieve information about. @@ -308,8 +420,8 @@ class AccessAnalyzer { /// /// To learn about filter keys that you can use to create an archive rule, see /// Access - /// Analyzer filter keys in the IAM User Guide. + /// href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-filter-keys.html">IAM + /// Access Analyzer filter keys in the IAM User Guide. /// /// May throw [ResourceNotFoundException]. /// May throw [ValidationException]. @@ -345,7 +457,9 @@ class AccessAnalyzer { /// May throw [AccessDeniedException]. /// /// Parameter [analyzerArn] : - /// The ARN of the analyzer that generated the finding. + /// The ARN + /// of the analyzer that generated the finding. /// /// Parameter [id] : /// The ID of the finding to retrieve. @@ -366,6 +480,144 @@ class AccessAnalyzer { return GetFindingResponse.fromJson(response); } + /// Retrieves the policy that was generated using + /// StartPolicyGeneration. + /// + /// May throw [ValidationException]. + /// May throw [InternalServerException]. + /// May throw [ThrottlingException]. + /// May throw [AccessDeniedException]. + /// + /// Parameter [jobId] : + /// The JobId that is returned by the + /// StartPolicyGeneration operation. The JobId can + /// be used with GetGeneratedPolicy to retrieve the generated + /// policies or used with CancelPolicyGeneration to cancel the + /// policy generation request. + /// + /// Parameter [includeResourcePlaceholders] : + /// The level of detail that you want to generate. You can specify whether to + /// generate policies with placeholders for resource ARNs for actions that + /// support resource level granularity in policies. + /// + /// For example, in the resource section of a policy, you can receive a + /// placeholder such as "Resource":"arn:aws:s3:::${BucketName}" + /// instead of "*". + /// + /// Parameter [includeServiceLevelTemplate] : + /// The level of detail that you want to generate. You can specify whether to + /// generate service-level policies. + /// + /// IAM Access Analyzer uses iam:servicelastaccessed to identify + /// services that have been used recently to create this service-level + /// template. + Future getGeneratedPolicy({ + required String jobId, + bool? includeResourcePlaceholders, + bool? includeServiceLevelTemplate, + }) async { + final $query = >{ + if (includeResourcePlaceholders != null) + 'includeResourcePlaceholders': [includeResourcePlaceholders.toString()], + if (includeServiceLevelTemplate != null) + 'includeServiceLevelTemplate': [includeServiceLevelTemplate.toString()], + }; + final response = await _protocol.send( + payload: null, + method: 'GET', + requestUri: '/policy/generation/${Uri.encodeComponent(jobId)}', + queryParams: $query, + exceptionFnMap: _exceptionFns, + ); + return GetGeneratedPolicyResponse.fromJson(response); + } + + /// Retrieves a list of access preview findings generated by the specified + /// access preview. + /// + /// May throw [ResourceNotFoundException]. + /// May throw [ConflictException]. + /// May throw [ValidationException]. + /// May throw [InternalServerException]. + /// May throw [ThrottlingException]. + /// May throw [AccessDeniedException]. + /// + /// Parameter [accessPreviewId] : + /// The unique ID for the access preview. + /// + /// Parameter [analyzerArn] : + /// The ARN + /// of the analyzer used to generate the access. + /// + /// Parameter [filter] : + /// Criteria to filter the returned findings. + /// + /// Parameter [maxResults] : + /// The maximum number of results to return in the response. + /// + /// Parameter [nextToken] : + /// A token used for pagination of results returned. + Future listAccessPreviewFindings({ + required String accessPreviewId, + required String analyzerArn, + Map? filter, + int? maxResults, + String? nextToken, + }) async { + final $payload = { + 'analyzerArn': analyzerArn, + if (filter != null) 'filter': filter, + if (maxResults != null) 'maxResults': maxResults, + if (nextToken != null) 'nextToken': nextToken, + }; + final response = await _protocol.send( + payload: $payload, + method: 'POST', + requestUri: '/access-preview/${Uri.encodeComponent(accessPreviewId)}', + exceptionFnMap: _exceptionFns, + ); + return ListAccessPreviewFindingsResponse.fromJson(response); + } + + /// Retrieves a list of access previews for the specified analyzer. + /// + /// May throw [ResourceNotFoundException]. + /// May throw [ValidationException]. + /// May throw [InternalServerException]. + /// May throw [ThrottlingException]. + /// May throw [AccessDeniedException]. + /// + /// Parameter [analyzerArn] : + /// The ARN + /// of the analyzer used to generate the access preview. + /// + /// Parameter [maxResults] : + /// The maximum number of results to return in the response. + /// + /// Parameter [nextToken] : + /// A token used for pagination of results returned. + Future listAccessPreviews({ + required String analyzerArn, + int? maxResults, + String? nextToken, + }) async { + final $query = >{ + 'analyzerArn': [analyzerArn], + if (maxResults != null) 'maxResults': [maxResults.toString()], + if (nextToken != null) 'nextToken': [nextToken], + }; + final response = await _protocol.send( + payload: null, + method: 'GET', + requestUri: '/access-preview', + queryParams: $query, + exceptionFnMap: _exceptionFns, + ); + return ListAccessPreviewsResponse.fromJson(response); + } + /// Retrieves a list of resources of the specified type that have been /// analyzed by the specified analyzer.. /// @@ -376,7 +628,9 @@ class AccessAnalyzer { /// May throw [AccessDeniedException]. /// /// Parameter [analyzerArn] : - /// The ARN of the analyzer to retrieve a list of analyzed resources from. + /// The ARN + /// of the analyzer to retrieve a list of analyzed resources from. /// /// Parameter [maxResults] : /// The maximum number of results to return in the response. @@ -478,10 +732,10 @@ class AccessAnalyzer { /// Retrieves a list of findings generated by the specified analyzer. /// - /// To learn about filter keys that you can use to create an archive rule, see - /// Access - /// Analyzer filter keys in the IAM User Guide. + /// To learn about filter keys that you can use to retrieve a list of + /// findings, see IAM + /// Access Analyzer filter keys in the IAM User Guide. /// /// May throw [ResourceNotFoundException]. /// May throw [ValidationException]. @@ -490,7 +744,9 @@ class AccessAnalyzer { /// May throw [AccessDeniedException]. /// /// Parameter [analyzerArn] : - /// The ARN of the analyzer to retrieve findings from. + /// The ARN + /// of the analyzer to retrieve findings from. /// /// Parameter [filter] : /// A filter to match for the findings to return. @@ -526,6 +782,49 @@ class AccessAnalyzer { return ListFindingsResponse.fromJson(response); } + /// Lists all of the policy generations requested in the last seven days. + /// + /// May throw [ValidationException]. + /// May throw [InternalServerException]. + /// May throw [ThrottlingException]. + /// May throw [AccessDeniedException]. + /// + /// Parameter [maxResults] : + /// The maximum number of results to return in the response. + /// + /// Parameter [nextToken] : + /// A token used for pagination of results returned. + /// + /// Parameter [principalArn] : + /// The ARN of the IAM entity (user or role) for which you are generating a + /// policy. Use this with ListGeneratedPolicies to filter the + /// results to only include results for a specific principal. + Future listPolicyGenerations({ + int? maxResults, + String? nextToken, + String? principalArn, + }) async { + _s.validateNumRange( + 'maxResults', + maxResults, + 1, + 1152921504606846976, + ); + final $query = >{ + if (maxResults != null) 'maxResults': [maxResults.toString()], + if (nextToken != null) 'nextToken': [nextToken], + if (principalArn != null) 'principalArn': [principalArn], + }; + final response = await _protocol.send( + payload: null, + method: 'GET', + requestUri: '/policy/generation', + queryParams: $query, + exceptionFnMap: _exceptionFns, + ); + return ListPolicyGenerationsResponse.fromJson(response); + } + /// Retrieves a list of tags applied to the specified resource. /// /// May throw [ResourceNotFoundException]. @@ -548,6 +847,52 @@ class AccessAnalyzer { return ListTagsForResourceResponse.fromJson(response); } + /// Starts the policy generation request. + /// + /// May throw [ConflictException]. + /// May throw [ValidationException]. + /// May throw [InternalServerException]. + /// May throw [ServiceQuotaExceededException]. + /// May throw [ThrottlingException]. + /// May throw [AccessDeniedException]. + /// + /// Parameter [policyGenerationDetails] : + /// Contains the ARN of the IAM entity (user or role) for which you are + /// generating a policy. + /// + /// Parameter [clientToken] : + /// A unique, case-sensitive identifier that you provide to ensure the + /// idempotency of the request. Idempotency ensures that an API request + /// completes only once. With an idempotent request, if the original request + /// completes successfully, the subsequent retries with the same client token + /// return the result from the original successful request and they have no + /// additional effect. + /// + /// If you do not specify a client token, one is automatically generated by + /// the Amazon Web Services SDK. + /// + /// Parameter [cloudTrailDetails] : + /// A CloudTrailDetails object that contains details about a + /// Trail that you want to analyze to generate policies. + Future startPolicyGeneration({ + required PolicyGenerationDetails policyGenerationDetails, + String? clientToken, + CloudTrailDetails? cloudTrailDetails, + }) async { + final $payload = { + 'policyGenerationDetails': policyGenerationDetails, + 'clientToken': clientToken ?? _s.generateIdempotencyToken(), + if (cloudTrailDetails != null) 'cloudTrailDetails': cloudTrailDetails, + }; + final response = await _protocol.send( + payload: $payload, + method: 'PUT', + requestUri: '/policy/generation', + exceptionFnMap: _exceptionFns, + ); + return StartPolicyGenerationResponse.fromJson(response); + } + /// Immediately starts a scan of the policies applied to the specified /// resource. /// @@ -558,18 +903,28 @@ class AccessAnalyzer { /// May throw [AccessDeniedException]. /// /// Parameter [analyzerArn] : - /// The ARN of the analyzer to use to scan the policies applied to the - /// specified resource. + /// The ARN + /// of the analyzer to use to scan the policies applied to the specified + /// resource. /// /// Parameter [resourceArn] : /// The ARN of the resource to scan. + /// + /// Parameter [resourceOwnerAccount] : + /// The Amazon Web Services account ID that owns the resource. For most Amazon + /// Web Services resources, the owning account is the account in which the + /// resource was created. Future startResourceScan({ required String analyzerArn, required String resourceArn, + String? resourceOwnerAccount, }) async { final $payload = { 'analyzerArn': analyzerArn, 'resourceArn': resourceArn, + if (resourceOwnerAccount != null) + 'resourceOwnerAccount': resourceOwnerAccount, }; await _protocol.send( payload: $payload, @@ -684,7 +1039,9 @@ class AccessAnalyzer { /// May throw [AccessDeniedException]. /// /// Parameter [analyzerArn] : - /// The ARN of the analyzer that generated the findings to update. + /// The ARN + /// of the analyzer that generated the findings to update. /// /// Parameter [status] : /// The state represents the action to take to update the finding Status. Use @@ -721,24 +1078,499 @@ class AccessAnalyzer { exceptionFnMap: _exceptionFns, ); } + + /// Requests the validation of a policy and returns a list of findings. The + /// findings help you identify issues and provide actionable recommendations + /// to resolve the issue and enable you to author functional policies that + /// meet security best practices. + /// + /// May throw [ValidationException]. + /// May throw [InternalServerException]. + /// May throw [ThrottlingException]. + /// May throw [AccessDeniedException]. + /// + /// Parameter [policyDocument] : + /// The JSON policy document to use as the content for the policy. + /// + /// Parameter [policyType] : + /// The type of policy to validate. Identity policies grant permissions to IAM + /// principals. Identity policies include managed and inline policies for IAM + /// roles, users, and groups. They also include service-control policies + /// (SCPs) that are attached to an Amazon Web Services organization, + /// organizational unit (OU), or an account. + /// + /// Resource policies grant permissions on Amazon Web Services resources. + /// Resource policies include trust policies for IAM roles and bucket policies + /// for Amazon S3 buckets. You can provide a generic input such as identity + /// policy or resource policy or a specific input such as managed policy or + /// Amazon S3 bucket policy. + /// + /// Parameter [locale] : + /// The locale to use for localizing the findings. + /// + /// Parameter [maxResults] : + /// The maximum number of results to return in the response. + /// + /// Parameter [nextToken] : + /// A token used for pagination of results returned. + /// + /// Parameter [validatePolicyResourceType] : + /// The type of resource to attach to your resource policy. Specify a value + /// for the policy validation resource type only if the policy type is + /// RESOURCE_POLICY. For example, to validate a resource policy + /// to attach to an Amazon S3 bucket, you can choose + /// AWS::S3::Bucket for the policy validation resource type. + /// + /// For resource types not supported as valid values, IAM Access Analyzer runs + /// policy checks that apply to all resource policies. For example, to + /// validate a resource policy to attach to a KMS key, do not specify a value + /// for the policy validation resource type and IAM Access Analyzer will run + /// policy checks that apply to all resource policies. + Future validatePolicy({ + required String policyDocument, + required PolicyType policyType, + Locale? locale, + int? maxResults, + String? nextToken, + ValidatePolicyResourceType? validatePolicyResourceType, + }) async { + final $query = >{ + if (maxResults != null) 'maxResults': [maxResults.toString()], + if (nextToken != null) 'nextToken': [nextToken], + }; + final $payload = { + 'policyDocument': policyDocument, + 'policyType': policyType.toValue(), + if (locale != null) 'locale': locale.toValue(), + if (validatePolicyResourceType != null) + 'validatePolicyResourceType': validatePolicyResourceType.toValue(), + }; + final response = await _protocol.send( + payload: $payload, + method: 'POST', + requestUri: '/policy/validation', + queryParams: $query, + exceptionFnMap: _exceptionFns, + ); + return ValidatePolicyResponse.fromJson(response); + } } -/// Contains details about the analyzed resource. -class AnalyzedResource { - /// The time at which the resource was analyzed. - final DateTime analyzedAt; +/// Contains information about an access preview. +class AccessPreview { + /// The ARN of the analyzer used to generate the access preview. + final String analyzerArn; - /// The time at which the finding was created. + /// A map of resource ARNs for the proposed resource configuration. + final Map configurations; + + /// The time at which the access preview was created. final DateTime createdAt; - /// Indicates whether the policy that generated the finding grants public access - /// to the resource. - final bool isPublic; + /// The unique ID for the access preview. + final String id; - /// The ARN of the resource that was analyzed. + /// The status of the access preview. + /// + ///
    + ///
  • + /// Creating - The access preview creation is in progress. + ///
  • + ///
  • + /// Completed - The access preview is complete. You can preview + /// findings for external access to the resource. + ///
  • + ///
  • + /// Failed - The access preview creation has failed. + ///
  • + ///
+ final AccessPreviewStatus status; + + /// Provides more details about the current status of the access preview. + /// + /// For example, if the creation of the access preview fails, a + /// Failed status is returned. This failure can be due to an + /// internal issue with the analysis or due to an invalid resource + /// configuration. + final AccessPreviewStatusReason? statusReason; + + AccessPreview({ + required this.analyzerArn, + required this.configurations, + required this.createdAt, + required this.id, + required this.status, + this.statusReason, + }); + + factory AccessPreview.fromJson(Map json) { + return AccessPreview( + analyzerArn: json['analyzerArn'] as String, + configurations: (json['configurations'] as Map).map( + (k, e) => + MapEntry(k, Configuration.fromJson(e as Map))), + createdAt: nonNullableTimeStampFromJson(json['createdAt'] as Object), + id: json['id'] as String, + status: (json['status'] as String).toAccessPreviewStatus(), + statusReason: json['statusReason'] != null + ? AccessPreviewStatusReason.fromJson( + json['statusReason'] as Map) + : null, + ); + } +} + +/// An access preview finding generated by the access preview. +class AccessPreviewFinding { + /// Provides context on how the access preview finding compares to existing + /// access identified in IAM Access Analyzer. + /// + ///
    + ///
  • + /// New - The finding is for newly-introduced access. + ///
  • + ///
  • + /// Unchanged - The preview finding is an existing finding that + /// would remain unchanged. + ///
  • + ///
  • + /// Changed - The preview finding is an existing finding with a + /// change in status. + ///
  • + ///
+ /// For example, a Changed finding with preview status + /// Resolved and existing status Active indicates the + /// existing Active finding would become Resolved as a + /// result of the proposed permissions change. + final FindingChangeType changeType; + + /// The time at which the access preview finding was created. + final DateTime createdAt; + + /// The ID of the access preview finding. This ID uniquely identifies the + /// element in the list of access preview findings and is not related to the + /// finding ID in Access Analyzer. + final String id; + + /// The Amazon Web Services account ID that owns the resource. For most Amazon + /// Web Services resources, the owning account is the account in which the + /// resource was created. + final String resourceOwnerAccount; + + /// The type of the resource that can be accessed in the finding. + final ResourceType resourceType; + + /// The preview status of the finding. This is what the status of the finding + /// would be after permissions deployment. For example, a Changed + /// finding with preview status Resolved and existing status + /// Active indicates the existing Active finding would + /// become Resolved as a result of the proposed permissions change. + final FindingStatus status; + + /// The action in the analyzed policy statement that an external principal has + /// permission to perform. + final List? action; + + /// The condition in the analyzed policy statement that resulted in a finding. + final Map? condition; + + /// An error. + final String? error; + + /// The existing ID of the finding in IAM Access Analyzer, provided only for + /// existing findings. + final String? existingFindingId; + + /// The existing status of the finding, provided only for existing findings. + final FindingStatus? existingFindingStatus; + + /// Indicates whether the policy that generated the finding allows public access + /// to the resource. + final bool? isPublic; + + /// The external principal that has access to a resource within the zone of + /// trust. + final Map? principal; + + /// The resource that an external principal has access to. This is the resource + /// associated with the access preview. + final String? resource; + + /// The sources of the finding. This indicates how the access that generated the + /// finding is granted. It is populated for Amazon S3 bucket findings. + final List? sources; + + AccessPreviewFinding({ + required this.changeType, + required this.createdAt, + required this.id, + required this.resourceOwnerAccount, + required this.resourceType, + required this.status, + this.action, + this.condition, + this.error, + this.existingFindingId, + this.existingFindingStatus, + this.isPublic, + this.principal, + this.resource, + this.sources, + }); + + factory AccessPreviewFinding.fromJson(Map json) { + return AccessPreviewFinding( + changeType: (json['changeType'] as String).toFindingChangeType(), + createdAt: nonNullableTimeStampFromJson(json['createdAt'] as Object), + id: json['id'] as String, + resourceOwnerAccount: json['resourceOwnerAccount'] as String, + resourceType: (json['resourceType'] as String).toResourceType(), + status: (json['status'] as String).toFindingStatus(), + action: (json['action'] as List?) + ?.whereNotNull() + .map((e) => e as String) + .toList(), + condition: (json['condition'] as Map?) + ?.map((k, e) => MapEntry(k, e as String)), + error: json['error'] as String?, + existingFindingId: json['existingFindingId'] as String?, + existingFindingStatus: + (json['existingFindingStatus'] as String?)?.toFindingStatus(), + isPublic: json['isPublic'] as bool?, + principal: (json['principal'] as Map?) + ?.map((k, e) => MapEntry(k, e as String)), + resource: json['resource'] as String?, + sources: (json['sources'] as List?) + ?.whereNotNull() + .map((e) => FindingSource.fromJson(e as Map)) + .toList(), + ); + } +} + +enum AccessPreviewStatus { + completed, + creating, + failed, +} + +extension AccessPreviewStatusValueExtension on AccessPreviewStatus { + String toValue() { + switch (this) { + case AccessPreviewStatus.completed: + return 'COMPLETED'; + case AccessPreviewStatus.creating: + return 'CREATING'; + case AccessPreviewStatus.failed: + return 'FAILED'; + } + } +} + +extension AccessPreviewStatusFromString on String { + AccessPreviewStatus toAccessPreviewStatus() { + switch (this) { + case 'COMPLETED': + return AccessPreviewStatus.completed; + case 'CREATING': + return AccessPreviewStatus.creating; + case 'FAILED': + return AccessPreviewStatus.failed; + } + throw Exception('$this is not known in enum AccessPreviewStatus'); + } +} + +/// Provides more details about the current status of the access preview. For +/// example, if the creation of the access preview fails, a Failed +/// status is returned. This failure can be due to an internal issue with the +/// analysis or due to an invalid proposed resource configuration. +class AccessPreviewStatusReason { + /// The reason code for the current status of the access preview. + final AccessPreviewStatusReasonCode code; + + AccessPreviewStatusReason({ + required this.code, + }); + + factory AccessPreviewStatusReason.fromJson(Map json) { + return AccessPreviewStatusReason( + code: (json['code'] as String).toAccessPreviewStatusReasonCode(), + ); + } +} + +enum AccessPreviewStatusReasonCode { + internalError, + invalidConfiguration, +} + +extension AccessPreviewStatusReasonCodeValueExtension + on AccessPreviewStatusReasonCode { + String toValue() { + switch (this) { + case AccessPreviewStatusReasonCode.internalError: + return 'INTERNAL_ERROR'; + case AccessPreviewStatusReasonCode.invalidConfiguration: + return 'INVALID_CONFIGURATION'; + } + } +} + +extension AccessPreviewStatusReasonCodeFromString on String { + AccessPreviewStatusReasonCode toAccessPreviewStatusReasonCode() { + switch (this) { + case 'INTERNAL_ERROR': + return AccessPreviewStatusReasonCode.internalError; + case 'INVALID_CONFIGURATION': + return AccessPreviewStatusReasonCode.invalidConfiguration; + } + throw Exception('$this is not known in enum AccessPreviewStatusReasonCode'); + } +} + +/// Contains a summary of information about an access preview. +class AccessPreviewSummary { + /// The ARN of the analyzer used to generate the access preview. + final String analyzerArn; + + /// The time at which the access preview was created. + final DateTime createdAt; + + /// The unique ID for the access preview. + final String id; + + /// The status of the access preview. + /// + ///
    + ///
  • + /// Creating - The access preview creation is in progress. + ///
  • + ///
  • + /// Completed - The access preview is complete and previews the + /// findings for external access to the resource. + ///
  • + ///
  • + /// Failed - The access preview creation has failed. + ///
  • + ///
+ final AccessPreviewStatus status; + final AccessPreviewStatusReason? statusReason; + + AccessPreviewSummary({ + required this.analyzerArn, + required this.createdAt, + required this.id, + required this.status, + this.statusReason, + }); + + factory AccessPreviewSummary.fromJson(Map json) { + return AccessPreviewSummary( + analyzerArn: json['analyzerArn'] as String, + createdAt: nonNullableTimeStampFromJson(json['createdAt'] as Object), + id: json['id'] as String, + status: (json['status'] as String).toAccessPreviewStatus(), + statusReason: json['statusReason'] != null + ? AccessPreviewStatusReason.fromJson( + json['statusReason'] as Map) + : null, + ); + } +} + +/// You specify each grantee as a type-value pair using one of these types. You +/// can specify only one type of grantee. For more information, see PutBucketAcl. +class AclGrantee { + /// The value specified is the canonical user ID of an Amazon Web Services + /// account. + final String? id; + + /// Used for granting permissions to a predefined group. + final String? uri; + + AclGrantee({ + this.id, + this.uri, + }); + + factory AclGrantee.fromJson(Map json) { + return AclGrantee( + id: json['id'] as String?, + uri: json['uri'] as String?, + ); + } + + Map toJson() { + final id = this.id; + final uri = this.uri; + return { + if (id != null) 'id': id, + if (uri != null) 'uri': uri, + }; + } +} + +enum AclPermission { + read, + write, + readAcp, + writeAcp, + fullControl, +} + +extension AclPermissionValueExtension on AclPermission { + String toValue() { + switch (this) { + case AclPermission.read: + return 'READ'; + case AclPermission.write: + return 'WRITE'; + case AclPermission.readAcp: + return 'READ_ACP'; + case AclPermission.writeAcp: + return 'WRITE_ACP'; + case AclPermission.fullControl: + return 'FULL_CONTROL'; + } + } +} + +extension AclPermissionFromString on String { + AclPermission toAclPermission() { + switch (this) { + case 'READ': + return AclPermission.read; + case 'WRITE': + return AclPermission.write; + case 'READ_ACP': + return AclPermission.readAcp; + case 'WRITE_ACP': + return AclPermission.writeAcp; + case 'FULL_CONTROL': + return AclPermission.fullControl; + } + throw Exception('$this is not known in enum AclPermission'); + } +} + +/// Contains details about the analyzed resource. +class AnalyzedResource { + /// The time at which the resource was analyzed. + final DateTime analyzedAt; + + /// The time at which the finding was created. + final DateTime createdAt; + + /// Indicates whether the policy that generated the finding grants public access + /// to the resource. + final bool isPublic; + + /// The ARN of the resource that was analyzed. final String resourceArn; - /// The AWS account ID that owns the resource. + /// The Amazon Web Services account ID that owns the resource. final String resourceOwnerAccount; /// The type of the resource that was analyzed. @@ -774,6 +1606,7 @@ class AnalyzedResource { this.sharedVia, this.status, }); + factory AnalyzedResource.fromJson(Map json) { return AnalyzedResource( analyzedAt: nonNullableTimeStampFromJson(json['analyzedAt'] as Object), @@ -802,7 +1635,7 @@ class AnalyzedResourceSummary { /// The ARN of the analyzed resource. final String resourceArn; - /// The AWS account ID that owns the resource. + /// The Amazon Web Services account ID that owns the resource. final String resourceOwnerAccount; /// The type of resource that was analyzed. @@ -813,6 +1646,7 @@ class AnalyzedResourceSummary { required this.resourceOwnerAccount, required this.resourceType, }); + factory AnalyzedResourceSummary.fromJson(Map json) { return AnalyzedResourceSummary( resourceArn: json['resourceArn'] as String, @@ -874,10 +1708,10 @@ class AnalyzerSummary { /// The status of the analyzer. An Active analyzer successfully /// monitors supported resources and generates new findings. The analyzer is /// Disabled when a user action, such as removing trusted access - /// for IAM Access Analyzer from AWS Organizations, causes the analyzer to stop - /// generating new findings. The status is Creating when the - /// analyzer creation is in progress and Failed when the analyzer - /// creation has failed. + /// for Identity and Access Management Access Analyzer from Organizations, + /// causes the analyzer to stop generating new findings. The status is + /// Creating when the analyzer creation is in progress and + /// Failed when the analyzer creation has failed. final AnalyzerStatus status; /// The type of analyzer, which corresponds to the zone of trust chosen for the @@ -892,10 +1726,10 @@ class AnalyzerSummary { /// The statusReason provides more details about the current status /// of the analyzer. For example, if the creation for the analyzer fails, a - /// Failed status is displayed. For an analyzer with organization - /// as the type, this failure can be due to an issue with creating the - /// service-linked roles required in the member accounts of the AWS - /// organization. + /// Failed status is returned. For an analyzer with organization as + /// the type, this failure can be due to an issue with creating the + /// service-linked roles required in the member accounts of the Amazon Web + /// Services organization. final StatusReason? statusReason; /// The tags added to the analyzer. @@ -912,6 +1746,7 @@ class AnalyzerSummary { this.statusReason, this.tags, }); + factory AnalyzerSummary.fromJson(Map json) { return AnalyzerSummary( arn: json['arn'] as String, @@ -950,6 +1785,7 @@ class ArchiveRuleSummary { required this.ruleName, required this.updatedAt, }); + factory ArchiveRuleSummary.fromJson(Map json) { return ArchiveRuleSummary( createdAt: nonNullableTimeStampFromJson(json['createdAt'] as Object), @@ -961,6 +1797,233 @@ class ArchiveRuleSummary { } } +class CancelPolicyGenerationResponse { + CancelPolicyGenerationResponse(); + + factory CancelPolicyGenerationResponse.fromJson(Map _) { + return CancelPolicyGenerationResponse(); + } +} + +/// Contains information about CloudTrail access. +class CloudTrailDetails { + /// The ARN of the service role that IAM Access Analyzer uses to access your + /// CloudTrail trail and service last accessed information. + final String accessRole; + + /// The start of the time range for which IAM Access Analyzer reviews your + /// CloudTrail events. Events with a timestamp before this time are not + /// considered to generate a policy. + final DateTime startTime; + + /// A Trail object that contains settings for a trail. + final List trails; + + /// The end of the time range for which IAM Access Analyzer reviews your + /// CloudTrail events. Events with a timestamp after this time are not + /// considered to generate a policy. If this is not included in the request, the + /// default value is the current time. + final DateTime? endTime; + + CloudTrailDetails({ + required this.accessRole, + required this.startTime, + required this.trails, + this.endTime, + }); + Map toJson() { + final accessRole = this.accessRole; + final startTime = this.startTime; + final trails = this.trails; + final endTime = this.endTime; + return { + 'accessRole': accessRole, + 'startTime': iso8601ToJson(startTime), + 'trails': trails, + if (endTime != null) 'endTime': iso8601ToJson(endTime), + }; + } +} + +/// Contains information about CloudTrail access. +class CloudTrailProperties { + /// The end of the time range for which IAM Access Analyzer reviews your + /// CloudTrail events. Events with a timestamp after this time are not + /// considered to generate a policy. If this is not included in the request, the + /// default value is the current time. + final DateTime endTime; + + /// The start of the time range for which IAM Access Analyzer reviews your + /// CloudTrail events. Events with a timestamp before this time are not + /// considered to generate a policy. + final DateTime startTime; + + /// A TrailProperties object that contains settings for trail + /// properties. + final List trailProperties; + + CloudTrailProperties({ + required this.endTime, + required this.startTime, + required this.trailProperties, + }); + + factory CloudTrailProperties.fromJson(Map json) { + return CloudTrailProperties( + endTime: nonNullableTimeStampFromJson(json['endTime'] as Object), + startTime: nonNullableTimeStampFromJson(json['startTime'] as Object), + trailProperties: (json['trailProperties'] as List) + .whereNotNull() + .map((e) => TrailProperties.fromJson(e as Map)) + .toList(), + ); + } +} + +/// Access control configuration structures for your resource. You specify the +/// configuration as a type-value pair. You can specify only one type of access +/// control configuration. +class Configuration { + /// The access control configuration is for an Amazon EBS volume snapshot. + final EbsSnapshotConfiguration? ebsSnapshot; + + /// The access control configuration is for an Amazon ECR repository. + final EcrRepositoryConfiguration? ecrRepository; + + /// The access control configuration is for an Amazon EFS file system. + final EfsFileSystemConfiguration? efsFileSystem; + + /// The access control configuration is for an IAM role. + final IamRoleConfiguration? iamRole; + + /// The access control configuration is for a KMS key. + final KmsKeyConfiguration? kmsKey; + + /// The access control configuration is for an Amazon RDS DB cluster snapshot. + final RdsDbClusterSnapshotConfiguration? rdsDbClusterSnapshot; + + /// The access control configuration is for an Amazon RDS DB snapshot. + final RdsDbSnapshotConfiguration? rdsDbSnapshot; + + /// The access control configuration is for an Amazon S3 Bucket. + final S3BucketConfiguration? s3Bucket; + + /// The access control configuration is for a Secrets Manager secret. + final SecretsManagerSecretConfiguration? secretsManagerSecret; + + /// The access control configuration is for an Amazon SNS topic + final SnsTopicConfiguration? snsTopic; + + /// The access control configuration is for an Amazon SQS queue. + final SqsQueueConfiguration? sqsQueue; + + Configuration({ + this.ebsSnapshot, + this.ecrRepository, + this.efsFileSystem, + this.iamRole, + this.kmsKey, + this.rdsDbClusterSnapshot, + this.rdsDbSnapshot, + this.s3Bucket, + this.secretsManagerSecret, + this.snsTopic, + this.sqsQueue, + }); + + factory Configuration.fromJson(Map json) { + return Configuration( + ebsSnapshot: json['ebsSnapshot'] != null + ? EbsSnapshotConfiguration.fromJson( + json['ebsSnapshot'] as Map) + : null, + ecrRepository: json['ecrRepository'] != null + ? EcrRepositoryConfiguration.fromJson( + json['ecrRepository'] as Map) + : null, + efsFileSystem: json['efsFileSystem'] != null + ? EfsFileSystemConfiguration.fromJson( + json['efsFileSystem'] as Map) + : null, + iamRole: json['iamRole'] != null + ? IamRoleConfiguration.fromJson( + json['iamRole'] as Map) + : null, + kmsKey: json['kmsKey'] != null + ? KmsKeyConfiguration.fromJson(json['kmsKey'] as Map) + : null, + rdsDbClusterSnapshot: json['rdsDbClusterSnapshot'] != null + ? RdsDbClusterSnapshotConfiguration.fromJson( + json['rdsDbClusterSnapshot'] as Map) + : null, + rdsDbSnapshot: json['rdsDbSnapshot'] != null + ? RdsDbSnapshotConfiguration.fromJson( + json['rdsDbSnapshot'] as Map) + : null, + s3Bucket: json['s3Bucket'] != null + ? S3BucketConfiguration.fromJson( + json['s3Bucket'] as Map) + : null, + secretsManagerSecret: json['secretsManagerSecret'] != null + ? SecretsManagerSecretConfiguration.fromJson( + json['secretsManagerSecret'] as Map) + : null, + snsTopic: json['snsTopic'] != null + ? SnsTopicConfiguration.fromJson( + json['snsTopic'] as Map) + : null, + sqsQueue: json['sqsQueue'] != null + ? SqsQueueConfiguration.fromJson( + json['sqsQueue'] as Map) + : null, + ); + } + + Map toJson() { + final ebsSnapshot = this.ebsSnapshot; + final ecrRepository = this.ecrRepository; + final efsFileSystem = this.efsFileSystem; + final iamRole = this.iamRole; + final kmsKey = this.kmsKey; + final rdsDbClusterSnapshot = this.rdsDbClusterSnapshot; + final rdsDbSnapshot = this.rdsDbSnapshot; + final s3Bucket = this.s3Bucket; + final secretsManagerSecret = this.secretsManagerSecret; + final snsTopic = this.snsTopic; + final sqsQueue = this.sqsQueue; + return { + if (ebsSnapshot != null) 'ebsSnapshot': ebsSnapshot, + if (ecrRepository != null) 'ecrRepository': ecrRepository, + if (efsFileSystem != null) 'efsFileSystem': efsFileSystem, + if (iamRole != null) 'iamRole': iamRole, + if (kmsKey != null) 'kmsKey': kmsKey, + if (rdsDbClusterSnapshot != null) + 'rdsDbClusterSnapshot': rdsDbClusterSnapshot, + if (rdsDbSnapshot != null) 'rdsDbSnapshot': rdsDbSnapshot, + if (s3Bucket != null) 's3Bucket': s3Bucket, + if (secretsManagerSecret != null) + 'secretsManagerSecret': secretsManagerSecret, + if (snsTopic != null) 'snsTopic': snsTopic, + if (sqsQueue != null) 'sqsQueue': sqsQueue, + }; + } +} + +class CreateAccessPreviewResponse { + /// The unique ID for the access preview. + final String id; + + CreateAccessPreviewResponse({ + required this.id, + }); + + factory CreateAccessPreviewResponse.fromJson(Map json) { + return CreateAccessPreviewResponse( + id: json['id'] as String, + ); + } +} + /// The response to the request to create an analyzer. class CreateAnalyzerResponse { /// The ARN of the analyzer that was created by the request. @@ -969,6 +2032,7 @@ class CreateAnalyzerResponse { CreateAnalyzerResponse({ this.arn, }); + factory CreateAnalyzerResponse.fromJson(Map json) { return CreateAnalyzerResponse( arn: json['arn'] as String?, @@ -976,7 +2040,10 @@ class CreateAnalyzerResponse { } } -/// The criteria to use in the filter that defines the archive rule. +/// The criteria to use in the filter that defines the archive rule. For more +/// information on available filter keys, see IAM +/// Access Analyzer filter keys. class Criterion { /// A "contains" operator to match for the filter used to create the rule. final List? contains; @@ -996,6 +2063,7 @@ class Criterion { this.exists, this.neq, }); + factory Criterion.fromJson(Map json) { return Criterion( contains: (json['contains'] as List?) @@ -1028,8 +2096,203 @@ class Criterion { } } -/// Contains information about a finding. -class Finding { +/// The proposed access control configuration for an Amazon EBS volume snapshot. +/// You can propose a configuration for a new Amazon EBS volume snapshot or an +/// Amazon EBS volume snapshot that you own by specifying the user IDs, groups, +/// and optional KMS encryption key. For more information, see ModifySnapshotAttribute. +class EbsSnapshotConfiguration { + /// The groups that have access to the Amazon EBS volume snapshot. If the value + /// all is specified, then the Amazon EBS volume snapshot is + /// public. + /// + ///
    + ///
  • + /// If the configuration is for an existing Amazon EBS volume snapshot and you + /// do not specify the groups, then the access preview uses the + /// existing shared groups for the snapshot. + ///
  • + ///
  • + /// If the access preview is for a new resource and you do not specify the + /// groups, then the access preview considers the snapshot without + /// any groups. + ///
  • + ///
  • + /// To propose deletion of existing shared groups, you can specify + /// an empty list for groups. + ///
  • + ///
+ final List? groups; + + /// The KMS key identifier for an encrypted Amazon EBS volume snapshot. The KMS + /// key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS + /// key. + /// + ///
    + ///
  • + /// If the configuration is for an existing Amazon EBS volume snapshot and you + /// do not specify the kmsKeyId, or you specify an empty string, + /// then the access preview uses the existing kmsKeyId of the + /// snapshot. + ///
  • + ///
  • + /// If the access preview is for a new resource and you do not specify the + /// kmsKeyId, the access preview considers the snapshot as + /// unencrypted. + ///
  • + ///
+ final String? kmsKeyId; + + /// The IDs of the Amazon Web Services accounts that have access to the Amazon + /// EBS volume snapshot. + /// + ///
    + ///
  • + /// If the configuration is for an existing Amazon EBS volume snapshot and you + /// do not specify the userIds, then the access preview uses the + /// existing shared userIds for the snapshot. + ///
  • + ///
  • + /// If the access preview is for a new resource and you do not specify the + /// userIds, then the access preview considers the snapshot without + /// any userIds. + ///
  • + ///
  • + /// To propose deletion of existing shared accountIds, you can + /// specify an empty list for userIds. + ///
  • + ///
+ final List? userIds; + + EbsSnapshotConfiguration({ + this.groups, + this.kmsKeyId, + this.userIds, + }); + + factory EbsSnapshotConfiguration.fromJson(Map json) { + return EbsSnapshotConfiguration( + groups: (json['groups'] as List?) + ?.whereNotNull() + .map((e) => e as String) + .toList(), + kmsKeyId: json['kmsKeyId'] as String?, + userIds: (json['userIds'] as List?) + ?.whereNotNull() + .map((e) => e as String) + .toList(), + ); + } + + Map toJson() { + final groups = this.groups; + final kmsKeyId = this.kmsKeyId; + final userIds = this.userIds; + return { + if (groups != null) 'groups': groups, + if (kmsKeyId != null) 'kmsKeyId': kmsKeyId, + if (userIds != null) 'userIds': userIds, + }; + } +} + +/// The proposed access control configuration for an Amazon ECR repository. You +/// can propose a configuration for a new Amazon ECR repository or an existing +/// Amazon ECR repository that you own by specifying the Amazon ECR policy. For +/// more information, see Repository. +/// +///
    +///
  • +/// If the configuration is for an existing Amazon ECR repository and you do not +/// specify the Amazon ECR policy, then the access preview uses the existing +/// Amazon ECR policy for the repository. +///
  • +///
  • +/// If the access preview is for a new resource and you do not specify the +/// policy, then the access preview assumes an Amazon ECR repository without a +/// policy. +///
  • +///
  • +/// To propose deletion of an existing Amazon ECR repository policy, you can +/// specify an empty string for the Amazon ECR policy. +///
  • +///
+class EcrRepositoryConfiguration { + /// The JSON repository policy text to apply to the Amazon ECR repository. For + /// more information, see Private + /// repository policy examples in the Amazon ECR User Guide. + final String? repositoryPolicy; + + EcrRepositoryConfiguration({ + this.repositoryPolicy, + }); + + factory EcrRepositoryConfiguration.fromJson(Map json) { + return EcrRepositoryConfiguration( + repositoryPolicy: json['repositoryPolicy'] as String?, + ); + } + + Map toJson() { + final repositoryPolicy = this.repositoryPolicy; + return { + if (repositoryPolicy != null) 'repositoryPolicy': repositoryPolicy, + }; + } +} + +/// The proposed access control configuration for an Amazon EFS file system. You +/// can propose a configuration for a new Amazon EFS file system or an existing +/// Amazon EFS file system that you own by specifying the Amazon EFS policy. For +/// more information, see Using file +/// systems in Amazon EFS. +/// +///
    +///
  • +/// If the configuration is for an existing Amazon EFS file system and you do +/// not specify the Amazon EFS policy, then the access preview uses the existing +/// Amazon EFS policy for the file system. +///
  • +///
  • +/// If the access preview is for a new resource and you do not specify the +/// policy, then the access preview assumes an Amazon EFS file system without a +/// policy. +///
  • +///
  • +/// To propose deletion of an existing Amazon EFS file system policy, you can +/// specify an empty string for the Amazon EFS policy. +///
  • +///
+class EfsFileSystemConfiguration { + /// The JSON policy definition to apply to the Amazon EFS file system. For more + /// information on the elements that make up a file system policy, see Amazon + /// EFS Resource-based policies. + final String? fileSystemPolicy; + + EfsFileSystemConfiguration({ + this.fileSystemPolicy, + }); + + factory EfsFileSystemConfiguration.fromJson(Map json) { + return EfsFileSystemConfiguration( + fileSystemPolicy: json['fileSystemPolicy'] as String?, + ); + } + + Map toJson() { + final fileSystemPolicy = this.fileSystemPolicy; + return { + if (fileSystemPolicy != null) 'fileSystemPolicy': fileSystemPolicy, + }; + } +} + +/// Contains information about a finding. +class Finding { /// The time at which the resource was analyzed. final DateTime analyzedAt; @@ -1042,10 +2305,10 @@ class Finding { /// The ID of the finding. final String id; - /// The AWS account ID that owns the resource. + /// The Amazon Web Services account ID that owns the resource. final String resourceOwnerAccount; - /// The type of the resource reported in the finding. + /// The type of the resource identified in the finding. final ResourceType resourceType; /// The current status of the finding. @@ -1091,6 +2354,7 @@ class Finding { this.resource, this.sources, }); + factory Finding.fromJson(Map json) { return Finding( analyzedAt: nonNullableTimeStampFromJson(json['analyzedAt'] as Object), @@ -1119,6 +2383,39 @@ class Finding { } } +enum FindingChangeType { + changed, + $new, + unchanged, +} + +extension FindingChangeTypeValueExtension on FindingChangeType { + String toValue() { + switch (this) { + case FindingChangeType.changed: + return 'CHANGED'; + case FindingChangeType.$new: + return 'NEW'; + case FindingChangeType.unchanged: + return 'UNCHANGED'; + } + } +} + +extension FindingChangeTypeFromString on String { + FindingChangeType toFindingChangeType() { + switch (this) { + case 'CHANGED': + return FindingChangeType.changed; + case 'NEW': + return FindingChangeType.$new; + case 'UNCHANGED': + return FindingChangeType.unchanged; + } + throw Exception('$this is not known in enum FindingChangeType'); + } +} + /// The source of the finding. This indicates how the access that generated the /// finding is granted. It is populated for Amazon S3 bucket findings. class FindingSource { @@ -1133,6 +2430,7 @@ class FindingSource { required this.type, this.detail, }); + factory FindingSource.fromJson(Map json) { return FindingSource( type: (json['type'] as String).toFindingSourceType(), @@ -1146,14 +2444,22 @@ class FindingSource { /// Includes details about how the access that generated the finding is granted. /// This is populated for Amazon S3 bucket findings. class FindingSourceDetail { - /// The ARN of the access point that generated the finding. + /// The account of the cross-account access point that generated the finding. + final String? accessPointAccount; + + /// The ARN of the access point that generated the finding. The ARN format + /// depends on whether the ARN represents an access point or a multi-region + /// access point. final String? accessPointArn; FindingSourceDetail({ + this.accessPointAccount, this.accessPointArn, }); + factory FindingSourceDetail.fromJson(Map json) { return FindingSourceDetail( + accessPointAccount: json['accessPointAccount'] as String?, accessPointArn: json['accessPointArn'] as String?, ); } @@ -1163,6 +2469,7 @@ enum FindingSourceType { policy, bucketAcl, s3AccessPoint, + s3AccessPointAccount, } extension FindingSourceTypeValueExtension on FindingSourceType { @@ -1174,6 +2481,8 @@ extension FindingSourceTypeValueExtension on FindingSourceType { return 'BUCKET_ACL'; case FindingSourceType.s3AccessPoint: return 'S3_ACCESS_POINT'; + case FindingSourceType.s3AccessPointAccount: + return 'S3_ACCESS_POINT_ACCOUNT'; } } } @@ -1187,6 +2496,8 @@ extension FindingSourceTypeFromString on String { return FindingSourceType.bucketAcl; case 'S3_ACCESS_POINT': return FindingSourceType.s3AccessPoint; + case 'S3_ACCESS_POINT_ACCOUNT': + return FindingSourceType.s3AccessPointAccount; } throw Exception('$this is not known in enum FindingSourceType'); } @@ -1268,7 +2579,7 @@ class FindingSummary { /// The ID of the finding. final String id; - /// The AWS account ID that owns the resource. + /// The Amazon Web Services account ID that owns the resource. final String resourceOwnerAccount; /// The type of the resource that the external principal has access to. @@ -1318,6 +2629,7 @@ class FindingSummary { this.resource, this.sources, }); + factory FindingSummary.fromJson(Map json) { return FindingSummary( analyzedAt: nonNullableTimeStampFromJson(json['analyzedAt'] as Object), @@ -1346,15 +2658,112 @@ class FindingSummary { } } +/// Contains the text for the generated policy. +class GeneratedPolicy { + /// The text to use as the content for the new policy. The policy is created + /// using the CreatePolicy + /// action. + final String policy; + + GeneratedPolicy({ + required this.policy, + }); + + factory GeneratedPolicy.fromJson(Map json) { + return GeneratedPolicy( + policy: json['policy'] as String, + ); + } +} + +/// Contains the generated policy details. +class GeneratedPolicyProperties { + /// The ARN of the IAM entity (user or role) for which you are generating a + /// policy. + final String principalArn; + + /// Lists details about the Trail used to generated policy. + final CloudTrailProperties? cloudTrailProperties; + + /// This value is set to true if the generated policy contains all + /// possible actions for a service that IAM Access Analyzer identified from the + /// CloudTrail trail that you specified, and false otherwise. + final bool? isComplete; + + GeneratedPolicyProperties({ + required this.principalArn, + this.cloudTrailProperties, + this.isComplete, + }); + + factory GeneratedPolicyProperties.fromJson(Map json) { + return GeneratedPolicyProperties( + principalArn: json['principalArn'] as String, + cloudTrailProperties: json['cloudTrailProperties'] != null + ? CloudTrailProperties.fromJson( + json['cloudTrailProperties'] as Map) + : null, + isComplete: json['isComplete'] as bool?, + ); + } +} + +/// Contains the text for the generated policy and its details. +class GeneratedPolicyResult { + /// A GeneratedPolicyProperties object that contains properties of + /// the generated policy. + final GeneratedPolicyProperties properties; + + /// The text to use as the content for the new policy. The policy is created + /// using the CreatePolicy + /// action. + final List? generatedPolicies; + + GeneratedPolicyResult({ + required this.properties, + this.generatedPolicies, + }); + + factory GeneratedPolicyResult.fromJson(Map json) { + return GeneratedPolicyResult( + properties: GeneratedPolicyProperties.fromJson( + json['properties'] as Map), + generatedPolicies: (json['generatedPolicies'] as List?) + ?.whereNotNull() + .map((e) => GeneratedPolicy.fromJson(e as Map)) + .toList(), + ); + } +} + +class GetAccessPreviewResponse { + /// An object that contains information about the access preview. + final AccessPreview accessPreview; + + GetAccessPreviewResponse({ + required this.accessPreview, + }); + + factory GetAccessPreviewResponse.fromJson(Map json) { + return GetAccessPreviewResponse( + accessPreview: + AccessPreview.fromJson(json['accessPreview'] as Map), + ); + } +} + /// The response to the request. class GetAnalyzedResourceResponse { - /// An AnalyedResource object that contains information that Access - /// Analyzer found when it analyzed the resource. + /// An AnalyzedResource object that contains information that IAM + /// Access Analyzer found when it analyzed the resource. final AnalyzedResource? resource; GetAnalyzedResourceResponse({ this.resource, }); + factory GetAnalyzedResourceResponse.fromJson(Map json) { return GetAnalyzedResourceResponse( resource: json['resource'] != null @@ -1373,6 +2782,7 @@ class GetAnalyzerResponse { GetAnalyzerResponse({ required this.analyzer, }); + factory GetAnalyzerResponse.fromJson(Map json) { return GetAnalyzerResponse( analyzer: @@ -1388,6 +2798,7 @@ class GetArchiveRuleResponse { GetArchiveRuleResponse({ required this.archiveRule, }); + factory GetArchiveRuleResponse.fromJson(Map json) { return GetArchiveRuleResponse( archiveRule: ArchiveRuleSummary.fromJson( @@ -1404,6 +2815,7 @@ class GetFindingResponse { GetFindingResponse({ this.finding, }); + factory GetFindingResponse.fromJson(Map json) { return GetFindingResponse( finding: json['finding'] != null @@ -1413,6 +2825,62 @@ class GetFindingResponse { } } +class GetGeneratedPolicyResponse { + /// A GeneratedPolicyResult object that contains the generated + /// policies and associated details. + final GeneratedPolicyResult generatedPolicyResult; + + /// A GeneratedPolicyDetails object that contains details about the + /// generated policy. + final JobDetails jobDetails; + + GetGeneratedPolicyResponse({ + required this.generatedPolicyResult, + required this.jobDetails, + }); + + factory GetGeneratedPolicyResponse.fromJson(Map json) { + return GetGeneratedPolicyResponse( + generatedPolicyResult: GeneratedPolicyResult.fromJson( + json['generatedPolicyResult'] as Map), + jobDetails: + JobDetails.fromJson(json['jobDetails'] as Map), + ); + } +} + +/// The proposed access control configuration for an IAM role. You can propose a +/// configuration for a new IAM role or an existing IAM role that you own by +/// specifying the trust policy. If the configuration is for a new IAM role, you +/// must specify the trust policy. If the configuration is for an existing IAM +/// role that you own and you do not propose the trust policy, the access +/// preview uses the existing trust policy for the role. The proposed trust +/// policy cannot be an empty string. For more information about role trust +/// policy limits, see IAM +/// and STS quotas. +class IamRoleConfiguration { + /// The proposed trust policy for the IAM role. + final String? trustPolicy; + + IamRoleConfiguration({ + this.trustPolicy, + }); + + factory IamRoleConfiguration.fromJson(Map json) { + return IamRoleConfiguration( + trustPolicy: json['trustPolicy'] as String?, + ); + } + + Map toJson() { + final trustPolicy = this.trustPolicy; + return { + if (trustPolicy != null) 'trustPolicy': trustPolicy, + }; + } +} + /// An criterion statement in an archive rule. Each archive rule may have /// multiple criteria. class InlineArchiveRule { @@ -1436,189 +2904,1190 @@ class InlineArchiveRule { } } -/// The response to the request. -class ListAnalyzedResourcesResponse { - /// A list of resources that were analyzed. - final List analyzedResources; +/// This configuration sets the network origin for the Amazon S3 access point or +/// multi-region access point to Internet. +class InternetConfiguration { + InternetConfiguration(); - /// A token used for pagination of results returned. - final String? nextToken; + factory InternetConfiguration.fromJson(Map _) { + return InternetConfiguration(); + } - ListAnalyzedResourcesResponse({ - required this.analyzedResources, - this.nextToken, - }); - factory ListAnalyzedResourcesResponse.fromJson(Map json) { - return ListAnalyzedResourcesResponse( - analyzedResources: (json['analyzedResources'] as List) - .whereNotNull() - .map((e) => - AnalyzedResourceSummary.fromJson(e as Map)) - .toList(), - nextToken: json['nextToken'] as String?, - ); + Map toJson() { + return {}; } } -/// The response to the request. -class ListAnalyzersResponse { - /// The analyzers retrieved. - final List analyzers; +/// Contains details about the policy generation request. +class JobDetails { + /// The JobId that is returned by the + /// StartPolicyGeneration operation. The JobId can be + /// used with GetGeneratedPolicy to retrieve the generated policies + /// or used with CancelPolicyGeneration to cancel the policy + /// generation request. + final String jobId; - /// A token used for pagination of results returned. - final String? nextToken; + /// A timestamp of when the job was started. + final DateTime startedOn; - ListAnalyzersResponse({ - required this.analyzers, - this.nextToken, - }); - factory ListAnalyzersResponse.fromJson(Map json) { - return ListAnalyzersResponse( - analyzers: (json['analyzers'] as List) - .whereNotNull() - .map((e) => AnalyzerSummary.fromJson(e as Map)) - .toList(), - nextToken: json['nextToken'] as String?, - ); - } -} + /// The status of the job request. + final JobStatus status; -/// The response to the request. -class ListArchiveRulesResponse { - /// A list of archive rules created for the specified analyzer. - final List archiveRules; + /// A timestamp of when the job was completed. + final DateTime? completedOn; - /// A token used for pagination of results returned. - final String? nextToken; + /// The job error for the policy generation request. + final JobError? jobError; - ListArchiveRulesResponse({ - required this.archiveRules, - this.nextToken, + JobDetails({ + required this.jobId, + required this.startedOn, + required this.status, + this.completedOn, + this.jobError, }); - factory ListArchiveRulesResponse.fromJson(Map json) { - return ListArchiveRulesResponse( - archiveRules: (json['archiveRules'] as List) - .whereNotNull() - .map((e) => ArchiveRuleSummary.fromJson(e as Map)) - .toList(), - nextToken: json['nextToken'] as String?, + + factory JobDetails.fromJson(Map json) { + return JobDetails( + jobId: json['jobId'] as String, + startedOn: nonNullableTimeStampFromJson(json['startedOn'] as Object), + status: (json['status'] as String).toJobStatus(), + completedOn: timeStampFromJson(json['completedOn']), + jobError: json['jobError'] != null + ? JobError.fromJson(json['jobError'] as Map) + : null, ); } } -/// The response to the request. -class ListFindingsResponse { - /// A list of findings retrieved from the analyzer that match the filter - /// criteria specified, if any. - final List findings; +/// Contains the details about the policy generation error. +class JobError { + /// The job error code. + final JobErrorCode code; - /// A token used for pagination of results returned. - final String? nextToken; + /// Specific information about the error. For example, which service quota was + /// exceeded or which resource was not found. + final String message; - ListFindingsResponse({ - required this.findings, - this.nextToken, + JobError({ + required this.code, + required this.message, }); - factory ListFindingsResponse.fromJson(Map json) { - return ListFindingsResponse( - findings: (json['findings'] as List) - .whereNotNull() - .map((e) => FindingSummary.fromJson(e as Map)) - .toList(), - nextToken: json['nextToken'] as String?, - ); - } -} -/// The response to the request. -class ListTagsForResourceResponse { - /// The tags that are applied to the specified resource. - final Map? tags; - - ListTagsForResourceResponse({ - this.tags, - }); - factory ListTagsForResourceResponse.fromJson(Map json) { - return ListTagsForResourceResponse( - tags: (json['tags'] as Map?) - ?.map((k, e) => MapEntry(k, e as String)), + factory JobError.fromJson(Map json) { + return JobError( + code: (json['code'] as String).toJobErrorCode(), + message: json['message'] as String, ); } } -enum OrderBy { - asc, - desc, +enum JobErrorCode { + authorizationError, + resourceNotFoundError, + serviceQuotaExceededError, + serviceError, } -extension OrderByValueExtension on OrderBy { +extension JobErrorCodeValueExtension on JobErrorCode { String toValue() { switch (this) { - case OrderBy.asc: - return 'ASC'; - case OrderBy.desc: - return 'DESC'; + case JobErrorCode.authorizationError: + return 'AUTHORIZATION_ERROR'; + case JobErrorCode.resourceNotFoundError: + return 'RESOURCE_NOT_FOUND_ERROR'; + case JobErrorCode.serviceQuotaExceededError: + return 'SERVICE_QUOTA_EXCEEDED_ERROR'; + case JobErrorCode.serviceError: + return 'SERVICE_ERROR'; } } } -extension OrderByFromString on String { - OrderBy toOrderBy() { +extension JobErrorCodeFromString on String { + JobErrorCode toJobErrorCode() { switch (this) { - case 'ASC': - return OrderBy.asc; - case 'DESC': - return OrderBy.desc; + case 'AUTHORIZATION_ERROR': + return JobErrorCode.authorizationError; + case 'RESOURCE_NOT_FOUND_ERROR': + return JobErrorCode.resourceNotFoundError; + case 'SERVICE_QUOTA_EXCEEDED_ERROR': + return JobErrorCode.serviceQuotaExceededError; + case 'SERVICE_ERROR': + return JobErrorCode.serviceError; } - throw Exception('$this is not known in enum OrderBy'); + throw Exception('$this is not known in enum JobErrorCode'); } } -enum ReasonCode { - awsServiceAccessDisabled, - delegatedAdministratorDeregistered, - organizationDeleted, - serviceLinkedRoleCreationFailed, +enum JobStatus { + inProgress, + succeeded, + failed, + canceled, } -extension ReasonCodeValueExtension on ReasonCode { +extension JobStatusValueExtension on JobStatus { String toValue() { switch (this) { - case ReasonCode.awsServiceAccessDisabled: - return 'AWS_SERVICE_ACCESS_DISABLED'; - case ReasonCode.delegatedAdministratorDeregistered: - return 'DELEGATED_ADMINISTRATOR_DEREGISTERED'; - case ReasonCode.organizationDeleted: - return 'ORGANIZATION_DELETED'; - case ReasonCode.serviceLinkedRoleCreationFailed: - return 'SERVICE_LINKED_ROLE_CREATION_FAILED'; + case JobStatus.inProgress: + return 'IN_PROGRESS'; + case JobStatus.succeeded: + return 'SUCCEEDED'; + case JobStatus.failed: + return 'FAILED'; + case JobStatus.canceled: + return 'CANCELED'; } } } -extension ReasonCodeFromString on String { - ReasonCode toReasonCode() { +extension JobStatusFromString on String { + JobStatus toJobStatus() { switch (this) { - case 'AWS_SERVICE_ACCESS_DISABLED': - return ReasonCode.awsServiceAccessDisabled; - case 'DELEGATED_ADMINISTRATOR_DEREGISTERED': - return ReasonCode.delegatedAdministratorDeregistered; - case 'ORGANIZATION_DELETED': - return ReasonCode.organizationDeleted; - case 'SERVICE_LINKED_ROLE_CREATION_FAILED': - return ReasonCode.serviceLinkedRoleCreationFailed; + case 'IN_PROGRESS': + return JobStatus.inProgress; + case 'SUCCEEDED': + return JobStatus.succeeded; + case 'FAILED': + return JobStatus.failed; + case 'CANCELED': + return JobStatus.canceled; } - throw Exception('$this is not known in enum ReasonCode'); + throw Exception('$this is not known in enum JobStatus'); } } -enum ResourceType { +/// A proposed grant configuration for a KMS key. For more information, see CreateGrant. +class KmsGrantConfiguration { + /// The principal that is given permission to perform the operations that the + /// grant permits. + final String granteePrincipal; + + /// The Amazon Web Services account under which the grant was issued. The + /// account is used to propose KMS grants issued by accounts other than the + /// owner of the key. + final String issuingAccount; + + /// A list of operations that the grant permits. + final List operations; + + /// Use this structure to propose allowing cryptographic + /// operations in the grant only when the operation request includes the + /// specified encryption + /// context. + final KmsGrantConstraints? constraints; + + /// The principal that is given permission to retire the grant by using RetireGrant + /// operation. + final String? retiringPrincipal; + + KmsGrantConfiguration({ + required this.granteePrincipal, + required this.issuingAccount, + required this.operations, + this.constraints, + this.retiringPrincipal, + }); + + factory KmsGrantConfiguration.fromJson(Map json) { + return KmsGrantConfiguration( + granteePrincipal: json['granteePrincipal'] as String, + issuingAccount: json['issuingAccount'] as String, + operations: (json['operations'] as List) + .whereNotNull() + .map((e) => (e as String).toKmsGrantOperation()) + .toList(), + constraints: json['constraints'] != null + ? KmsGrantConstraints.fromJson( + json['constraints'] as Map) + : null, + retiringPrincipal: json['retiringPrincipal'] as String?, + ); + } + + Map toJson() { + final granteePrincipal = this.granteePrincipal; + final issuingAccount = this.issuingAccount; + final operations = this.operations; + final constraints = this.constraints; + final retiringPrincipal = this.retiringPrincipal; + return { + 'granteePrincipal': granteePrincipal, + 'issuingAccount': issuingAccount, + 'operations': operations.map((e) => e.toValue()).toList(), + if (constraints != null) 'constraints': constraints, + if (retiringPrincipal != null) 'retiringPrincipal': retiringPrincipal, + }; + } +} + +/// Use this structure to propose allowing cryptographic +/// operations in the grant only when the operation request includes the +/// specified encryption +/// context. You can specify only one type of encryption context. An empty +/// map is treated as not specified. For more information, see GrantConstraints. +class KmsGrantConstraints { + /// A list of key-value pairs that must match the encryption context in the cryptographic + /// operation request. The grant allows the operation only when the + /// encryption context in the request is the same as the encryption context + /// specified in this constraint. + final Map? encryptionContextEquals; + + /// A list of key-value pairs that must be included in the encryption context of + /// the cryptographic + /// operation request. The grant allows the cryptographic operation only + /// when the encryption context in the request includes the key-value pairs + /// specified in this constraint, although it can include additional key-value + /// pairs. + final Map? encryptionContextSubset; + + KmsGrantConstraints({ + this.encryptionContextEquals, + this.encryptionContextSubset, + }); + + factory KmsGrantConstraints.fromJson(Map json) { + return KmsGrantConstraints( + encryptionContextEquals: + (json['encryptionContextEquals'] as Map?) + ?.map((k, e) => MapEntry(k, e as String)), + encryptionContextSubset: + (json['encryptionContextSubset'] as Map?) + ?.map((k, e) => MapEntry(k, e as String)), + ); + } + + Map toJson() { + final encryptionContextEquals = this.encryptionContextEquals; + final encryptionContextSubset = this.encryptionContextSubset; + return { + if (encryptionContextEquals != null) + 'encryptionContextEquals': encryptionContextEquals, + if (encryptionContextSubset != null) + 'encryptionContextSubset': encryptionContextSubset, + }; + } +} + +enum KmsGrantOperation { + createGrant, + decrypt, + describeKey, + encrypt, + generateDataKey, + generateDataKeyPair, + generateDataKeyPairWithoutPlaintext, + generateDataKeyWithoutPlaintext, + getPublicKey, + reEncryptFrom, + reEncryptTo, + retireGrant, + sign, + verify, +} + +extension KmsGrantOperationValueExtension on KmsGrantOperation { + String toValue() { + switch (this) { + case KmsGrantOperation.createGrant: + return 'CreateGrant'; + case KmsGrantOperation.decrypt: + return 'Decrypt'; + case KmsGrantOperation.describeKey: + return 'DescribeKey'; + case KmsGrantOperation.encrypt: + return 'Encrypt'; + case KmsGrantOperation.generateDataKey: + return 'GenerateDataKey'; + case KmsGrantOperation.generateDataKeyPair: + return 'GenerateDataKeyPair'; + case KmsGrantOperation.generateDataKeyPairWithoutPlaintext: + return 'GenerateDataKeyPairWithoutPlaintext'; + case KmsGrantOperation.generateDataKeyWithoutPlaintext: + return 'GenerateDataKeyWithoutPlaintext'; + case KmsGrantOperation.getPublicKey: + return 'GetPublicKey'; + case KmsGrantOperation.reEncryptFrom: + return 'ReEncryptFrom'; + case KmsGrantOperation.reEncryptTo: + return 'ReEncryptTo'; + case KmsGrantOperation.retireGrant: + return 'RetireGrant'; + case KmsGrantOperation.sign: + return 'Sign'; + case KmsGrantOperation.verify: + return 'Verify'; + } + } +} + +extension KmsGrantOperationFromString on String { + KmsGrantOperation toKmsGrantOperation() { + switch (this) { + case 'CreateGrant': + return KmsGrantOperation.createGrant; + case 'Decrypt': + return KmsGrantOperation.decrypt; + case 'DescribeKey': + return KmsGrantOperation.describeKey; + case 'Encrypt': + return KmsGrantOperation.encrypt; + case 'GenerateDataKey': + return KmsGrantOperation.generateDataKey; + case 'GenerateDataKeyPair': + return KmsGrantOperation.generateDataKeyPair; + case 'GenerateDataKeyPairWithoutPlaintext': + return KmsGrantOperation.generateDataKeyPairWithoutPlaintext; + case 'GenerateDataKeyWithoutPlaintext': + return KmsGrantOperation.generateDataKeyWithoutPlaintext; + case 'GetPublicKey': + return KmsGrantOperation.getPublicKey; + case 'ReEncryptFrom': + return KmsGrantOperation.reEncryptFrom; + case 'ReEncryptTo': + return KmsGrantOperation.reEncryptTo; + case 'RetireGrant': + return KmsGrantOperation.retireGrant; + case 'Sign': + return KmsGrantOperation.sign; + case 'Verify': + return KmsGrantOperation.verify; + } + throw Exception('$this is not known in enum KmsGrantOperation'); + } +} + +/// Proposed access control configuration for a KMS key. You can propose a +/// configuration for a new KMS key or an existing KMS key that you own by +/// specifying the key policy and KMS grant configuration. If the configuration +/// is for an existing key and you do not specify the key policy, the access +/// preview uses the existing policy for the key. If the access preview is for a +/// new resource and you do not specify the key policy, then the access preview +/// uses the default key policy. The proposed key policy cannot be an empty +/// string. For more information, see Default +/// key policy. For more information about key policy limits, see Resource +/// quotas. +///

+class KmsKeyConfiguration { + /// A list of proposed grant configurations for the KMS key. If the proposed + /// grant configuration is for an existing key, the access preview uses the + /// proposed list of grant configurations in place of the existing grants. + /// Otherwise, the access preview uses the existing grants for the key. + final List? grants; + + /// Resource policy configuration for the KMS key. The only valid value for the + /// name of the key policy is default. For more information, see Default + /// key policy. + final Map? keyPolicies; + + KmsKeyConfiguration({ + this.grants, + this.keyPolicies, + }); + + factory KmsKeyConfiguration.fromJson(Map json) { + return KmsKeyConfiguration( + grants: (json['grants'] as List?) + ?.whereNotNull() + .map((e) => KmsGrantConfiguration.fromJson(e as Map)) + .toList(), + keyPolicies: (json['keyPolicies'] as Map?) + ?.map((k, e) => MapEntry(k, e as String)), + ); + } + + Map toJson() { + final grants = this.grants; + final keyPolicies = this.keyPolicies; + return { + if (grants != null) 'grants': grants, + if (keyPolicies != null) 'keyPolicies': keyPolicies, + }; + } +} + +class ListAccessPreviewFindingsResponse { + /// A list of access preview findings that match the specified filter criteria. + final List findings; + + /// A token used for pagination of results returned. + final String? nextToken; + + ListAccessPreviewFindingsResponse({ + required this.findings, + this.nextToken, + }); + + factory ListAccessPreviewFindingsResponse.fromJson( + Map json) { + return ListAccessPreviewFindingsResponse( + findings: (json['findings'] as List) + .whereNotNull() + .map((e) => AccessPreviewFinding.fromJson(e as Map)) + .toList(), + nextToken: json['nextToken'] as String?, + ); + } +} + +class ListAccessPreviewsResponse { + /// A list of access previews retrieved for the analyzer. + final List accessPreviews; + + /// A token used for pagination of results returned. + final String? nextToken; + + ListAccessPreviewsResponse({ + required this.accessPreviews, + this.nextToken, + }); + + factory ListAccessPreviewsResponse.fromJson(Map json) { + return ListAccessPreviewsResponse( + accessPreviews: (json['accessPreviews'] as List) + .whereNotNull() + .map((e) => AccessPreviewSummary.fromJson(e as Map)) + .toList(), + nextToken: json['nextToken'] as String?, + ); + } +} + +/// The response to the request. +class ListAnalyzedResourcesResponse { + /// A list of resources that were analyzed. + final List analyzedResources; + + /// A token used for pagination of results returned. + final String? nextToken; + + ListAnalyzedResourcesResponse({ + required this.analyzedResources, + this.nextToken, + }); + + factory ListAnalyzedResourcesResponse.fromJson(Map json) { + return ListAnalyzedResourcesResponse( + analyzedResources: (json['analyzedResources'] as List) + .whereNotNull() + .map((e) => + AnalyzedResourceSummary.fromJson(e as Map)) + .toList(), + nextToken: json['nextToken'] as String?, + ); + } +} + +/// The response to the request. +class ListAnalyzersResponse { + /// The analyzers retrieved. + final List analyzers; + + /// A token used for pagination of results returned. + final String? nextToken; + + ListAnalyzersResponse({ + required this.analyzers, + this.nextToken, + }); + + factory ListAnalyzersResponse.fromJson(Map json) { + return ListAnalyzersResponse( + analyzers: (json['analyzers'] as List) + .whereNotNull() + .map((e) => AnalyzerSummary.fromJson(e as Map)) + .toList(), + nextToken: json['nextToken'] as String?, + ); + } +} + +/// The response to the request. +class ListArchiveRulesResponse { + /// A list of archive rules created for the specified analyzer. + final List archiveRules; + + /// A token used for pagination of results returned. + final String? nextToken; + + ListArchiveRulesResponse({ + required this.archiveRules, + this.nextToken, + }); + + factory ListArchiveRulesResponse.fromJson(Map json) { + return ListArchiveRulesResponse( + archiveRules: (json['archiveRules'] as List) + .whereNotNull() + .map((e) => ArchiveRuleSummary.fromJson(e as Map)) + .toList(), + nextToken: json['nextToken'] as String?, + ); + } +} + +/// The response to the request. +class ListFindingsResponse { + /// A list of findings retrieved from the analyzer that match the filter + /// criteria specified, if any. + final List findings; + + /// A token used for pagination of results returned. + final String? nextToken; + + ListFindingsResponse({ + required this.findings, + this.nextToken, + }); + + factory ListFindingsResponse.fromJson(Map json) { + return ListFindingsResponse( + findings: (json['findings'] as List) + .whereNotNull() + .map((e) => FindingSummary.fromJson(e as Map)) + .toList(), + nextToken: json['nextToken'] as String?, + ); + } +} + +class ListPolicyGenerationsResponse { + /// A PolicyGeneration object that contains details about the + /// generated policy. + final List policyGenerations; + + /// A token used for pagination of results returned. + final String? nextToken; + + ListPolicyGenerationsResponse({ + required this.policyGenerations, + this.nextToken, + }); + + factory ListPolicyGenerationsResponse.fromJson(Map json) { + return ListPolicyGenerationsResponse( + policyGenerations: (json['policyGenerations'] as List) + .whereNotNull() + .map((e) => PolicyGeneration.fromJson(e as Map)) + .toList(), + nextToken: json['nextToken'] as String?, + ); + } +} + +/// The response to the request. +class ListTagsForResourceResponse { + /// The tags that are applied to the specified resource. + final Map? tags; + + ListTagsForResourceResponse({ + this.tags, + }); + + factory ListTagsForResourceResponse.fromJson(Map json) { + return ListTagsForResourceResponse( + tags: (json['tags'] as Map?) + ?.map((k, e) => MapEntry(k, e as String)), + ); + } +} + +enum Locale { + de, + en, + es, + fr, + it, + ja, + ko, + ptBr, + zhCn, + zhTw, +} + +extension LocaleValueExtension on Locale { + String toValue() { + switch (this) { + case Locale.de: + return 'DE'; + case Locale.en: + return 'EN'; + case Locale.es: + return 'ES'; + case Locale.fr: + return 'FR'; + case Locale.it: + return 'IT'; + case Locale.ja: + return 'JA'; + case Locale.ko: + return 'KO'; + case Locale.ptBr: + return 'PT_BR'; + case Locale.zhCn: + return 'ZH_CN'; + case Locale.zhTw: + return 'ZH_TW'; + } + } +} + +extension LocaleFromString on String { + Locale toLocale() { + switch (this) { + case 'DE': + return Locale.de; + case 'EN': + return Locale.en; + case 'ES': + return Locale.es; + case 'FR': + return Locale.fr; + case 'IT': + return Locale.it; + case 'JA': + return Locale.ja; + case 'KO': + return Locale.ko; + case 'PT_BR': + return Locale.ptBr; + case 'ZH_CN': + return Locale.zhCn; + case 'ZH_TW': + return Locale.zhTw; + } + throw Exception('$this is not known in enum Locale'); + } +} + +/// A location in a policy that is represented as a path through the JSON +/// representation and a corresponding span. +class Location { + /// A path in a policy, represented as a sequence of path elements. + final List path; + + /// A span in a policy. + final Span span; + + Location({ + required this.path, + required this.span, + }); + + factory Location.fromJson(Map json) { + return Location( + path: (json['path'] as List) + .whereNotNull() + .map((e) => PathElement.fromJson(e as Map)) + .toList(), + span: Span.fromJson(json['span'] as Map), + ); + } +} + +/// The proposed InternetConfiguration or +/// VpcConfiguration to apply to the Amazon S3 access point. +/// VpcConfiguration does not apply to multi-region access points. +/// You can make the access point accessible from the internet, or you can +/// specify that all requests made through that access point must originate from +/// a specific virtual private cloud (VPC). You can specify only one type of +/// network configuration. For more information, see Creating +/// access points. +class NetworkOriginConfiguration { + /// The configuration for the Amazon S3 access point or multi-region access + /// point with an Internet origin. + final InternetConfiguration? internetConfiguration; + final VpcConfiguration? vpcConfiguration; + + NetworkOriginConfiguration({ + this.internetConfiguration, + this.vpcConfiguration, + }); + + factory NetworkOriginConfiguration.fromJson(Map json) { + return NetworkOriginConfiguration( + internetConfiguration: json['internetConfiguration'] != null + ? InternetConfiguration.fromJson( + json['internetConfiguration'] as Map) + : null, + vpcConfiguration: json['vpcConfiguration'] != null + ? VpcConfiguration.fromJson( + json['vpcConfiguration'] as Map) + : null, + ); + } + + Map toJson() { + final internetConfiguration = this.internetConfiguration; + final vpcConfiguration = this.vpcConfiguration; + return { + if (internetConfiguration != null) + 'internetConfiguration': internetConfiguration, + if (vpcConfiguration != null) 'vpcConfiguration': vpcConfiguration, + }; + } +} + +enum OrderBy { + asc, + desc, +} + +extension OrderByValueExtension on OrderBy { + String toValue() { + switch (this) { + case OrderBy.asc: + return 'ASC'; + case OrderBy.desc: + return 'DESC'; + } + } +} + +extension OrderByFromString on String { + OrderBy toOrderBy() { + switch (this) { + case 'ASC': + return OrderBy.asc; + case 'DESC': + return OrderBy.desc; + } + throw Exception('$this is not known in enum OrderBy'); + } +} + +/// A single element in a path through the JSON representation of a policy. +class PathElement { + /// Refers to an index in a JSON array. + final int? index; + + /// Refers to a key in a JSON object. + final String? key; + + /// Refers to a substring of a literal string in a JSON object. + final Substring? substring; + + /// Refers to the value associated with a given key in a JSON object. + final String? value; + + PathElement({ + this.index, + this.key, + this.substring, + this.value, + }); + + factory PathElement.fromJson(Map json) { + return PathElement( + index: json['index'] as int?, + key: json['key'] as String?, + substring: json['substring'] != null + ? Substring.fromJson(json['substring'] as Map) + : null, + value: json['value'] as String?, + ); + } +} + +/// Contains details about the policy generation status and properties. +class PolicyGeneration { + /// The JobId that is returned by the + /// StartPolicyGeneration operation. The JobId can be + /// used with GetGeneratedPolicy to retrieve the generated policies + /// or used with CancelPolicyGeneration to cancel the policy + /// generation request. + final String jobId; + + /// The ARN of the IAM entity (user or role) for which you are generating a + /// policy. + final String principalArn; + + /// A timestamp of when the policy generation started. + final DateTime startedOn; + + /// The status of the policy generation request. + final JobStatus status; + + /// A timestamp of when the policy generation was completed. + final DateTime? completedOn; + + PolicyGeneration({ + required this.jobId, + required this.principalArn, + required this.startedOn, + required this.status, + this.completedOn, + }); + + factory PolicyGeneration.fromJson(Map json) { + return PolicyGeneration( + jobId: json['jobId'] as String, + principalArn: json['principalArn'] as String, + startedOn: nonNullableTimeStampFromJson(json['startedOn'] as Object), + status: (json['status'] as String).toJobStatus(), + completedOn: timeStampFromJson(json['completedOn']), + ); + } +} + +/// Contains the ARN details about the IAM entity for which the policy is +/// generated. +class PolicyGenerationDetails { + /// The ARN of the IAM entity (user or role) for which you are generating a + /// policy. + final String principalArn; + + PolicyGenerationDetails({ + required this.principalArn, + }); + Map toJson() { + final principalArn = this.principalArn; + return { + 'principalArn': principalArn, + }; + } +} + +enum PolicyType { + identityPolicy, + resourcePolicy, + serviceControlPolicy, +} + +extension PolicyTypeValueExtension on PolicyType { + String toValue() { + switch (this) { + case PolicyType.identityPolicy: + return 'IDENTITY_POLICY'; + case PolicyType.resourcePolicy: + return 'RESOURCE_POLICY'; + case PolicyType.serviceControlPolicy: + return 'SERVICE_CONTROL_POLICY'; + } + } +} + +extension PolicyTypeFromString on String { + PolicyType toPolicyType() { + switch (this) { + case 'IDENTITY_POLICY': + return PolicyType.identityPolicy; + case 'RESOURCE_POLICY': + return PolicyType.resourcePolicy; + case 'SERVICE_CONTROL_POLICY': + return PolicyType.serviceControlPolicy; + } + throw Exception('$this is not known in enum PolicyType'); + } +} + +/// A position in a policy. +class Position { + /// The column of the position, starting from 0. + final int column; + + /// The line of the position, starting from 1. + final int line; + + /// The offset within the policy that corresponds to the position, starting from + /// 0. + final int offset; + + Position({ + required this.column, + required this.line, + required this.offset, + }); + + factory Position.fromJson(Map json) { + return Position( + column: json['column'] as int, + line: json['line'] as int, + offset: json['offset'] as int, + ); + } +} + +/// The values for a manual Amazon RDS DB cluster snapshot attribute. +class RdsDbClusterSnapshotAttributeValue { + /// The Amazon Web Services account IDs that have access to the manual Amazon + /// RDS DB cluster snapshot. If the value all is specified, then + /// the Amazon RDS DB cluster snapshot is public and can be copied or restored + /// by all Amazon Web Services accounts. + /// + ///

    + ///
  • + /// If the configuration is for an existing Amazon RDS DB cluster snapshot and + /// you do not specify the accountIds in + /// RdsDbClusterSnapshotAttributeValue, then the access preview + /// uses the existing shared accountIds for the snapshot. + ///
  • + ///
  • + /// If the access preview is for a new resource and you do not specify the + /// specify the accountIds in + /// RdsDbClusterSnapshotAttributeValue, then the access preview + /// considers the snapshot without any attributes. + ///
  • + ///
  • + /// To propose deletion of existing shared accountIds, you can + /// specify an empty list for accountIds in the + /// RdsDbClusterSnapshotAttributeValue. + ///
  • + ///
+ final List? accountIds; + + RdsDbClusterSnapshotAttributeValue({ + this.accountIds, + }); + + factory RdsDbClusterSnapshotAttributeValue.fromJson( + Map json) { + return RdsDbClusterSnapshotAttributeValue( + accountIds: (json['accountIds'] as List?) + ?.whereNotNull() + .map((e) => e as String) + .toList(), + ); + } + + Map toJson() { + final accountIds = this.accountIds; + return { + if (accountIds != null) 'accountIds': accountIds, + }; + } +} + +/// The proposed access control configuration for an Amazon RDS DB cluster +/// snapshot. You can propose a configuration for a new Amazon RDS DB cluster +/// snapshot or an Amazon RDS DB cluster snapshot that you own by specifying the +/// RdsDbClusterSnapshotAttributeValue and optional KMS encryption +/// key. For more information, see ModifyDBClusterSnapshotAttribute. +class RdsDbClusterSnapshotConfiguration { + /// The names and values of manual DB cluster snapshot attributes. Manual DB + /// cluster snapshot attributes are used to authorize other Amazon Web Services + /// accounts to restore a manual DB cluster snapshot. The only valid value for + /// AttributeName for the attribute map is restore + final Map? attributes; + + /// The KMS key identifier for an encrypted Amazon RDS DB cluster snapshot. The + /// KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the + /// KMS key. + /// + ///
    + ///
  • + /// If the configuration is for an existing Amazon RDS DB cluster snapshot and + /// you do not specify the kmsKeyId, or you specify an empty + /// string, then the access preview uses the existing kmsKeyId of + /// the snapshot. + ///
  • + ///
  • + /// If the access preview is for a new resource and you do not specify the + /// specify the kmsKeyId, then the access preview considers the + /// snapshot as unencrypted. + ///
  • + ///
+ final String? kmsKeyId; + + RdsDbClusterSnapshotConfiguration({ + this.attributes, + this.kmsKeyId, + }); + + factory RdsDbClusterSnapshotConfiguration.fromJson( + Map json) { + return RdsDbClusterSnapshotConfiguration( + attributes: (json['attributes'] as Map?)?.map((k, e) => + MapEntry( + k, + RdsDbClusterSnapshotAttributeValue.fromJson( + e as Map))), + kmsKeyId: json['kmsKeyId'] as String?, + ); + } + + Map toJson() { + final attributes = this.attributes; + final kmsKeyId = this.kmsKeyId; + return { + if (attributes != null) 'attributes': attributes, + if (kmsKeyId != null) 'kmsKeyId': kmsKeyId, + }; + } +} + +/// The name and values of a manual Amazon RDS DB snapshot attribute. Manual DB +/// snapshot attributes are used to authorize other Amazon Web Services accounts +/// to restore a manual DB snapshot. +class RdsDbSnapshotAttributeValue { + /// The Amazon Web Services account IDs that have access to the manual Amazon + /// RDS DB snapshot. If the value all is specified, then the Amazon + /// RDS DB snapshot is public and can be copied or restored by all Amazon Web + /// Services accounts. + /// + ///
    + ///
  • + /// If the configuration is for an existing Amazon RDS DB snapshot and you do + /// not specify the accountIds in + /// RdsDbSnapshotAttributeValue, then the access preview uses the + /// existing shared accountIds for the snapshot. + ///
  • + ///
  • + /// If the access preview is for a new resource and you do not specify the + /// specify the accountIds in + /// RdsDbSnapshotAttributeValue, then the access preview considers + /// the snapshot without any attributes. + ///
  • + ///
  • + /// To propose deletion of an existing shared accountIds, you can + /// specify an empty list for accountIds in the + /// RdsDbSnapshotAttributeValue. + ///
  • + ///
+ final List? accountIds; + + RdsDbSnapshotAttributeValue({ + this.accountIds, + }); + + factory RdsDbSnapshotAttributeValue.fromJson(Map json) { + return RdsDbSnapshotAttributeValue( + accountIds: (json['accountIds'] as List?) + ?.whereNotNull() + .map((e) => e as String) + .toList(), + ); + } + + Map toJson() { + final accountIds = this.accountIds; + return { + if (accountIds != null) 'accountIds': accountIds, + }; + } +} + +/// The proposed access control configuration for an Amazon RDS DB snapshot. You +/// can propose a configuration for a new Amazon RDS DB snapshot or an Amazon +/// RDS DB snapshot that you own by specifying the +/// RdsDbSnapshotAttributeValue and optional KMS encryption key. +/// For more information, see ModifyDBSnapshotAttribute. +class RdsDbSnapshotConfiguration { + /// The names and values of manual DB snapshot attributes. Manual DB snapshot + /// attributes are used to authorize other Amazon Web Services accounts to + /// restore a manual DB snapshot. The only valid value for + /// attributeName for the attribute map is restore. + final Map? attributes; + + /// The KMS key identifier for an encrypted Amazon RDS DB snapshot. The KMS key + /// identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. + /// + ///
    + ///
  • + /// If the configuration is for an existing Amazon RDS DB snapshot and you do + /// not specify the kmsKeyId, or you specify an empty string, then + /// the access preview uses the existing kmsKeyId of the snapshot. + ///
  • + ///
  • + /// If the access preview is for a new resource and you do not specify the + /// specify the kmsKeyId, then the access preview considers the + /// snapshot as unencrypted. + ///
  • + ///
+ final String? kmsKeyId; + + RdsDbSnapshotConfiguration({ + this.attributes, + this.kmsKeyId, + }); + + factory RdsDbSnapshotConfiguration.fromJson(Map json) { + return RdsDbSnapshotConfiguration( + attributes: (json['attributes'] as Map?)?.map((k, e) => + MapEntry(k, + RdsDbSnapshotAttributeValue.fromJson(e as Map))), + kmsKeyId: json['kmsKeyId'] as String?, + ); + } + + Map toJson() { + final attributes = this.attributes; + final kmsKeyId = this.kmsKeyId; + return { + if (attributes != null) 'attributes': attributes, + if (kmsKeyId != null) 'kmsKeyId': kmsKeyId, + }; + } +} + +enum ReasonCode { + awsServiceAccessDisabled, + delegatedAdministratorDeregistered, + organizationDeleted, + serviceLinkedRoleCreationFailed, +} + +extension ReasonCodeValueExtension on ReasonCode { + String toValue() { + switch (this) { + case ReasonCode.awsServiceAccessDisabled: + return 'AWS_SERVICE_ACCESS_DISABLED'; + case ReasonCode.delegatedAdministratorDeregistered: + return 'DELEGATED_ADMINISTRATOR_DEREGISTERED'; + case ReasonCode.organizationDeleted: + return 'ORGANIZATION_DELETED'; + case ReasonCode.serviceLinkedRoleCreationFailed: + return 'SERVICE_LINKED_ROLE_CREATION_FAILED'; + } + } +} + +extension ReasonCodeFromString on String { + ReasonCode toReasonCode() { + switch (this) { + case 'AWS_SERVICE_ACCESS_DISABLED': + return ReasonCode.awsServiceAccessDisabled; + case 'DELEGATED_ADMINISTRATOR_DEREGISTERED': + return ReasonCode.delegatedAdministratorDeregistered; + case 'ORGANIZATION_DELETED': + return ReasonCode.organizationDeleted; + case 'SERVICE_LINKED_ROLE_CREATION_FAILED': + return ReasonCode.serviceLinkedRoleCreationFailed; + } + throw Exception('$this is not known in enum ReasonCode'); + } +} + +enum ResourceType { awsS3Bucket, awsIamRole, awsSqsQueue, awsLambdaFunction, awsLambdaLayerVersion, awsKmsKey, + awsSecretsManagerSecret, + awsEfsFileSystem, + awsEc2Snapshot, + awsEcrRepository, + awsRdsDBSnapshot, + awsRdsDBClusterSnapshot, + awsSnsTopic, } extension ResourceTypeValueExtension on ResourceType { @@ -1636,6 +4105,20 @@ extension ResourceTypeValueExtension on ResourceType { return 'AWS::Lambda::LayerVersion'; case ResourceType.awsKmsKey: return 'AWS::KMS::Key'; + case ResourceType.awsSecretsManagerSecret: + return 'AWS::SecretsManager::Secret'; + case ResourceType.awsEfsFileSystem: + return 'AWS::EFS::FileSystem'; + case ResourceType.awsEc2Snapshot: + return 'AWS::EC2::Snapshot'; + case ResourceType.awsEcrRepository: + return 'AWS::ECR::Repository'; + case ResourceType.awsRdsDBSnapshot: + return 'AWS::RDS::DBSnapshot'; + case ResourceType.awsRdsDBClusterSnapshot: + return 'AWS::RDS::DBClusterSnapshot'; + case ResourceType.awsSnsTopic: + return 'AWS::SNS::Topic'; } } } @@ -1655,11 +4138,314 @@ extension ResourceTypeFromString on String { return ResourceType.awsLambdaLayerVersion; case 'AWS::KMS::Key': return ResourceType.awsKmsKey; + case 'AWS::SecretsManager::Secret': + return ResourceType.awsSecretsManagerSecret; + case 'AWS::EFS::FileSystem': + return ResourceType.awsEfsFileSystem; + case 'AWS::EC2::Snapshot': + return ResourceType.awsEc2Snapshot; + case 'AWS::ECR::Repository': + return ResourceType.awsEcrRepository; + case 'AWS::RDS::DBSnapshot': + return ResourceType.awsRdsDBSnapshot; + case 'AWS::RDS::DBClusterSnapshot': + return ResourceType.awsRdsDBClusterSnapshot; + case 'AWS::SNS::Topic': + return ResourceType.awsSnsTopic; } throw Exception('$this is not known in enum ResourceType'); } } +/// The configuration for an Amazon S3 access point or multi-region access point +/// for the bucket. You can propose up to 10 access points or multi-region +/// access points per bucket. If the proposed Amazon S3 access point +/// configuration is for an existing bucket, the access preview uses the +/// proposed access point configuration in place of the existing access points. +/// To propose an access point without a policy, you can provide an empty string +/// as the access point policy. For more information, see Creating +/// access points. For more information about access point policy limits, +/// see Access +/// points restrictions and limitations. +class S3AccessPointConfiguration { + /// The access point or multi-region access point policy. + final String? accessPointPolicy; + + /// The proposed Internet and VpcConfiguration to + /// apply to this Amazon S3 access point. VpcConfiguration does not + /// apply to multi-region access points. If the access preview is for a new + /// resource and neither is specified, the access preview uses + /// Internet for the network origin. If the access preview is for + /// an existing resource and neither is specified, the access preview uses the + /// exiting network origin. + final NetworkOriginConfiguration? networkOrigin; + + /// The proposed S3PublicAccessBlock configuration to apply to this + /// Amazon S3 access point or multi-region access point. + final S3PublicAccessBlockConfiguration? publicAccessBlock; + + S3AccessPointConfiguration({ + this.accessPointPolicy, + this.networkOrigin, + this.publicAccessBlock, + }); + + factory S3AccessPointConfiguration.fromJson(Map json) { + return S3AccessPointConfiguration( + accessPointPolicy: json['accessPointPolicy'] as String?, + networkOrigin: json['networkOrigin'] != null + ? NetworkOriginConfiguration.fromJson( + json['networkOrigin'] as Map) + : null, + publicAccessBlock: json['publicAccessBlock'] != null + ? S3PublicAccessBlockConfiguration.fromJson( + json['publicAccessBlock'] as Map) + : null, + ); + } + + Map toJson() { + final accessPointPolicy = this.accessPointPolicy; + final networkOrigin = this.networkOrigin; + final publicAccessBlock = this.publicAccessBlock; + return { + if (accessPointPolicy != null) 'accessPointPolicy': accessPointPolicy, + if (networkOrigin != null) 'networkOrigin': networkOrigin, + if (publicAccessBlock != null) 'publicAccessBlock': publicAccessBlock, + }; + } +} + +/// A proposed access control list grant configuration for an Amazon S3 bucket. +/// For more information, see How +/// to Specify an ACL. +class S3BucketAclGrantConfiguration { + /// The grantee to whom you’re assigning access rights. + final AclGrantee grantee; + + /// The permissions being granted. + final AclPermission permission; + + S3BucketAclGrantConfiguration({ + required this.grantee, + required this.permission, + }); + + factory S3BucketAclGrantConfiguration.fromJson(Map json) { + return S3BucketAclGrantConfiguration( + grantee: AclGrantee.fromJson(json['grantee'] as Map), + permission: (json['permission'] as String).toAclPermission(), + ); + } + + Map toJson() { + final grantee = this.grantee; + final permission = this.permission; + return { + 'grantee': grantee, + 'permission': permission.toValue(), + }; + } +} + +/// Proposed access control configuration for an Amazon S3 bucket. You can +/// propose a configuration for a new Amazon S3 bucket or an existing Amazon S3 +/// bucket that you own by specifying the Amazon S3 bucket policy, bucket ACLs, +/// bucket BPA settings, Amazon S3 access points, and multi-region access points +/// attached to the bucket. If the configuration is for an existing Amazon S3 +/// bucket and you do not specify the Amazon S3 bucket policy, the access +/// preview uses the existing policy attached to the bucket. If the access +/// preview is for a new resource and you do not specify the Amazon S3 bucket +/// policy, the access preview assumes a bucket without a policy. To propose +/// deletion of an existing bucket policy, you can specify an empty string. For +/// more information about bucket policy limits, see Bucket +/// Policy Examples. +class S3BucketConfiguration { + /// The configuration of Amazon S3 access points or multi-region access points + /// for the bucket. You can propose up to 10 new access points per bucket. + final Map? accessPoints; + + /// The proposed list of ACL grants for the Amazon S3 bucket. You can propose up + /// to 100 ACL grants per bucket. If the proposed grant configuration is for an + /// existing bucket, the access preview uses the proposed list of grant + /// configurations in place of the existing grants. Otherwise, the access + /// preview uses the existing grants for the bucket. + final List? bucketAclGrants; + + /// The proposed bucket policy for the Amazon S3 bucket. + final String? bucketPolicy; + + /// The proposed block public access configuration for the Amazon S3 bucket. + final S3PublicAccessBlockConfiguration? bucketPublicAccessBlock; + + S3BucketConfiguration({ + this.accessPoints, + this.bucketAclGrants, + this.bucketPolicy, + this.bucketPublicAccessBlock, + }); + + factory S3BucketConfiguration.fromJson(Map json) { + return S3BucketConfiguration( + accessPoints: (json['accessPoints'] as Map?)?.map( + (k, e) => MapEntry(k, + S3AccessPointConfiguration.fromJson(e as Map))), + bucketAclGrants: (json['bucketAclGrants'] as List?) + ?.whereNotNull() + .map((e) => + S3BucketAclGrantConfiguration.fromJson(e as Map)) + .toList(), + bucketPolicy: json['bucketPolicy'] as String?, + bucketPublicAccessBlock: json['bucketPublicAccessBlock'] != null + ? S3PublicAccessBlockConfiguration.fromJson( + json['bucketPublicAccessBlock'] as Map) + : null, + ); + } + + Map toJson() { + final accessPoints = this.accessPoints; + final bucketAclGrants = this.bucketAclGrants; + final bucketPolicy = this.bucketPolicy; + final bucketPublicAccessBlock = this.bucketPublicAccessBlock; + return { + if (accessPoints != null) 'accessPoints': accessPoints, + if (bucketAclGrants != null) 'bucketAclGrants': bucketAclGrants, + if (bucketPolicy != null) 'bucketPolicy': bucketPolicy, + if (bucketPublicAccessBlock != null) + 'bucketPublicAccessBlock': bucketPublicAccessBlock, + }; + } +} + +/// The PublicAccessBlock configuration to apply to this Amazon S3 +/// bucket. If the proposed configuration is for an existing Amazon S3 bucket +/// and the configuration is not specified, the access preview uses the existing +/// setting. If the proposed configuration is for a new bucket and the +/// configuration is not specified, the access preview uses false. +/// If the proposed configuration is for a new access point or multi-region +/// access point and the access point BPA configuration is not specified, the +/// access preview uses true. For more information, see PublicAccessBlockConfiguration. +class S3PublicAccessBlockConfiguration { + /// Specifies whether Amazon S3 should ignore public ACLs for this bucket and + /// objects in this bucket. + final bool ignorePublicAcls; + + /// Specifies whether Amazon S3 should restrict public bucket policies for this + /// bucket. + final bool restrictPublicBuckets; + + S3PublicAccessBlockConfiguration({ + required this.ignorePublicAcls, + required this.restrictPublicBuckets, + }); + + factory S3PublicAccessBlockConfiguration.fromJson(Map json) { + return S3PublicAccessBlockConfiguration( + ignorePublicAcls: json['ignorePublicAcls'] as bool, + restrictPublicBuckets: json['restrictPublicBuckets'] as bool, + ); + } + + Map toJson() { + final ignorePublicAcls = this.ignorePublicAcls; + final restrictPublicBuckets = this.restrictPublicBuckets; + return { + 'ignorePublicAcls': ignorePublicAcls, + 'restrictPublicBuckets': restrictPublicBuckets, + }; + } +} + +/// The configuration for a Secrets Manager secret. For more information, see CreateSecret. +/// +/// You can propose a configuration for a new secret or an existing secret that +/// you own by specifying the secret policy and optional KMS encryption key. If +/// the configuration is for an existing secret and you do not specify the +/// secret policy, the access preview uses the existing policy for the secret. +/// If the access preview is for a new resource and you do not specify the +/// policy, the access preview assumes a secret without a policy. To propose +/// deletion of an existing policy, you can specify an empty string. If the +/// proposed configuration is for a new secret and you do not specify the KMS +/// key ID, the access preview uses the Amazon Web Services managed key +/// aws/secretsmanager. If you specify an empty string for the KMS +/// key ID, the access preview uses the Amazon Web Services managed key of the +/// Amazon Web Services account. For more information about secret policy +/// limits, see Quotas +/// for Secrets Manager.. +class SecretsManagerSecretConfiguration { + /// The proposed ARN, key ID, or alias of the KMS key. + final String? kmsKeyId; + + /// The proposed resource policy defining who can access or manage the secret. + final String? secretPolicy; + + SecretsManagerSecretConfiguration({ + this.kmsKeyId, + this.secretPolicy, + }); + + factory SecretsManagerSecretConfiguration.fromJson( + Map json) { + return SecretsManagerSecretConfiguration( + kmsKeyId: json['kmsKeyId'] as String?, + secretPolicy: json['secretPolicy'] as String?, + ); + } + + Map toJson() { + final kmsKeyId = this.kmsKeyId; + final secretPolicy = this.secretPolicy; + return { + if (kmsKeyId != null) 'kmsKeyId': kmsKeyId, + if (secretPolicy != null) 'secretPolicy': secretPolicy, + }; + } +} + +/// The proposed access control configuration for an Amazon SNS topic. You can +/// propose a configuration for a new Amazon SNS topic or an existing Amazon SNS +/// topic that you own by specifying the policy. If the configuration is for an +/// existing Amazon SNS topic and you do not specify the Amazon SNS policy, then +/// the access preview uses the existing Amazon SNS policy for the topic. If the +/// access preview is for a new resource and you do not specify the policy, then +/// the access preview assumes an Amazon SNS topic without a policy. To propose +/// deletion of an existing Amazon SNS topic policy, you can specify an empty +/// string for the Amazon SNS policy. For more information, see Topic. +class SnsTopicConfiguration { + /// The JSON policy text that defines who can access an Amazon SNS topic. For + /// more information, see Example + /// cases for Amazon SNS access control in the Amazon SNS Developer + /// Guide. + final String? topicPolicy; + + SnsTopicConfiguration({ + this.topicPolicy, + }); + + factory SnsTopicConfiguration.fromJson(Map json) { + return SnsTopicConfiguration( + topicPolicy: json['topicPolicy'] as String?, + ); + } + + Map toJson() { + final topicPolicy = this.topicPolicy; + return { + if (topicPolicy != null) 'topicPolicy': topicPolicy, + }; + } +} + /// The criteria used to sort. class SortCriteria { /// The name of the attribute to sort on. @@ -1682,11 +4468,86 @@ class SortCriteria { } } +/// A span in a policy. The span consists of a start position (inclusive) and +/// end position (exclusive). +class Span { + /// The end position of the span (exclusive). + final Position end; + + /// The start position of the span (inclusive). + final Position start; + + Span({ + required this.end, + required this.start, + }); + + factory Span.fromJson(Map json) { + return Span( + end: Position.fromJson(json['end'] as Map), + start: Position.fromJson(json['start'] as Map), + ); + } +} + +/// The proposed access control configuration for an Amazon SQS queue. You can +/// propose a configuration for a new Amazon SQS queue or an existing Amazon SQS +/// queue that you own by specifying the Amazon SQS policy. If the configuration +/// is for an existing Amazon SQS queue and you do not specify the Amazon SQS +/// policy, the access preview uses the existing Amazon SQS policy for the +/// queue. If the access preview is for a new resource and you do not specify +/// the policy, the access preview assumes an Amazon SQS queue without a policy. +/// To propose deletion of an existing Amazon SQS queue policy, you can specify +/// an empty string for the Amazon SQS policy. For more information about Amazon +/// SQS policy limits, see Quotas +/// related to policies. +class SqsQueueConfiguration { + /// The proposed resource policy for the Amazon SQS queue. + final String? queuePolicy; + + SqsQueueConfiguration({ + this.queuePolicy, + }); + + factory SqsQueueConfiguration.fromJson(Map json) { + return SqsQueueConfiguration( + queuePolicy: json['queuePolicy'] as String?, + ); + } + + Map toJson() { + final queuePolicy = this.queuePolicy; + return { + if (queuePolicy != null) 'queuePolicy': queuePolicy, + }; + } +} + +class StartPolicyGenerationResponse { + /// The JobId that is returned by the + /// StartPolicyGeneration operation. The JobId can be + /// used with GetGeneratedPolicy to retrieve the generated policies + /// or used with CancelPolicyGeneration to cancel the policy + /// generation request. + final String jobId; + + StartPolicyGenerationResponse({ + required this.jobId, + }); + + factory StartPolicyGenerationResponse.fromJson(Map json) { + return StartPolicyGenerationResponse( + jobId: json['jobId'] as String, + ); + } +} + /// Provides more details about the current status of the analyzer. For example, /// if the creation for the analyzer fails, a Failed status is -/// displayed. For an analyzer with organization as the type, this failure can -/// be due to an issue with creating the service-linked roles required in the -/// member accounts of the AWS organization. +/// returned. For an analyzer with organization as the type, this failure can be +/// due to an issue with creating the service-linked roles required in the +/// member accounts of the Amazon Web Services organization. class StatusReason { /// The reason code for the current status of the analyzer. final ReasonCode code; @@ -1694,6 +4555,7 @@ class StatusReason { StatusReason({ required this.code, }); + factory StatusReason.fromJson(Map json) { return StatusReason( code: (json['code'] as String).toReasonCode(), @@ -1701,14 +4563,103 @@ class StatusReason { } } +/// A reference to a substring of a literal string in a JSON document. +class Substring { + /// The length of the substring. + final int length; + + /// The start index of the substring, starting from 0. + final int start; + + Substring({ + required this.length, + required this.start, + }); + + factory Substring.fromJson(Map json) { + return Substring( + length: json['length'] as int, + start: json['start'] as int, + ); + } +} + /// The response to the request. class TagResourceResponse { TagResourceResponse(); + factory TagResourceResponse.fromJson(Map _) { return TagResourceResponse(); } } +/// Contains details about the CloudTrail trail being analyzed to generate a +/// policy. +class Trail { + /// Specifies the ARN of the trail. The format of a trail ARN is + /// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail. + final String cloudTrailArn; + + /// Possible values are true or false. If set to + /// true, IAM Access Analyzer retrieves CloudTrail data from all + /// regions to analyze and generate a policy. + final bool? allRegions; + + /// A list of regions to get CloudTrail data from and analyze to generate a + /// policy. + final List? regions; + + Trail({ + required this.cloudTrailArn, + this.allRegions, + this.regions, + }); + Map toJson() { + final cloudTrailArn = this.cloudTrailArn; + final allRegions = this.allRegions; + final regions = this.regions; + return { + 'cloudTrailArn': cloudTrailArn, + if (allRegions != null) 'allRegions': allRegions, + if (regions != null) 'regions': regions, + }; + } +} + +/// Contains details about the CloudTrail trail being analyzed to generate a +/// policy. +class TrailProperties { + /// Specifies the ARN of the trail. The format of a trail ARN is + /// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail. + final String cloudTrailArn; + + /// Possible values are true or false. If set to + /// true, IAM Access Analyzer retrieves CloudTrail data from all + /// regions to analyze and generate a policy. + final bool? allRegions; + + /// A list of regions to get CloudTrail data from and analyze to generate a + /// policy. + final List? regions; + + TrailProperties({ + required this.cloudTrailArn, + this.allRegions, + this.regions, + }); + + factory TrailProperties.fromJson(Map json) { + return TrailProperties( + cloudTrailArn: json['cloudTrailArn'] as String, + allRegions: json['allRegions'] as bool?, + regions: (json['regions'] as List?) + ?.whereNotNull() + .map((e) => e as String) + .toList(), + ); + } +} + enum Type { account, organization, @@ -1740,11 +4691,201 @@ extension TypeFromString on String { /// The response to the request. class UntagResourceResponse { UntagResourceResponse(); + factory UntagResourceResponse.fromJson(Map _) { return UntagResourceResponse(); } } +/// A finding in a policy. Each finding is an actionable recommendation that can +/// be used to improve the policy. +class ValidatePolicyFinding { + /// A localized message that explains the finding and provides guidance on how + /// to address it. + final String findingDetails; + + /// The impact of the finding. + /// + /// Security warnings report when the policy allows access that we consider + /// overly permissive. + /// + /// Errors report when a part of the policy is not functional. + /// + /// Warnings report non-security issues when a policy does not conform to policy + /// writing best practices. + /// + /// Suggestions recommend stylistic improvements in the policy that do not + /// impact access. + final ValidatePolicyFindingType findingType; + + /// The issue code provides an identifier of the issue associated with this + /// finding. + final String issueCode; + + /// A link to additional documentation about the type of finding. + final String learnMoreLink; + + /// The list of locations in the policy document that are related to the + /// finding. The issue code provides a summary of an issue identified by the + /// finding. + final List locations; + + ValidatePolicyFinding({ + required this.findingDetails, + required this.findingType, + required this.issueCode, + required this.learnMoreLink, + required this.locations, + }); + + factory ValidatePolicyFinding.fromJson(Map json) { + return ValidatePolicyFinding( + findingDetails: json['findingDetails'] as String, + findingType: + (json['findingType'] as String).toValidatePolicyFindingType(), + issueCode: json['issueCode'] as String, + learnMoreLink: json['learnMoreLink'] as String, + locations: (json['locations'] as List) + .whereNotNull() + .map((e) => Location.fromJson(e as Map)) + .toList(), + ); + } +} + +enum ValidatePolicyFindingType { + error, + securityWarning, + suggestion, + warning, +} + +extension ValidatePolicyFindingTypeValueExtension on ValidatePolicyFindingType { + String toValue() { + switch (this) { + case ValidatePolicyFindingType.error: + return 'ERROR'; + case ValidatePolicyFindingType.securityWarning: + return 'SECURITY_WARNING'; + case ValidatePolicyFindingType.suggestion: + return 'SUGGESTION'; + case ValidatePolicyFindingType.warning: + return 'WARNING'; + } + } +} + +extension ValidatePolicyFindingTypeFromString on String { + ValidatePolicyFindingType toValidatePolicyFindingType() { + switch (this) { + case 'ERROR': + return ValidatePolicyFindingType.error; + case 'SECURITY_WARNING': + return ValidatePolicyFindingType.securityWarning; + case 'SUGGESTION': + return ValidatePolicyFindingType.suggestion; + case 'WARNING': + return ValidatePolicyFindingType.warning; + } + throw Exception('$this is not known in enum ValidatePolicyFindingType'); + } +} + +enum ValidatePolicyResourceType { + awsS3Bucket, + awsS3AccessPoint, + awsS3MultiRegionAccessPoint, + awsS3ObjectLambdaAccessPoint, + awsIamAssumeRolePolicyDocument, +} + +extension ValidatePolicyResourceTypeValueExtension + on ValidatePolicyResourceType { + String toValue() { + switch (this) { + case ValidatePolicyResourceType.awsS3Bucket: + return 'AWS::S3::Bucket'; + case ValidatePolicyResourceType.awsS3AccessPoint: + return 'AWS::S3::AccessPoint'; + case ValidatePolicyResourceType.awsS3MultiRegionAccessPoint: + return 'AWS::S3::MultiRegionAccessPoint'; + case ValidatePolicyResourceType.awsS3ObjectLambdaAccessPoint: + return 'AWS::S3ObjectLambda::AccessPoint'; + case ValidatePolicyResourceType.awsIamAssumeRolePolicyDocument: + return 'AWS::IAM::AssumeRolePolicyDocument'; + } + } +} + +extension ValidatePolicyResourceTypeFromString on String { + ValidatePolicyResourceType toValidatePolicyResourceType() { + switch (this) { + case 'AWS::S3::Bucket': + return ValidatePolicyResourceType.awsS3Bucket; + case 'AWS::S3::AccessPoint': + return ValidatePolicyResourceType.awsS3AccessPoint; + case 'AWS::S3::MultiRegionAccessPoint': + return ValidatePolicyResourceType.awsS3MultiRegionAccessPoint; + case 'AWS::S3ObjectLambda::AccessPoint': + return ValidatePolicyResourceType.awsS3ObjectLambdaAccessPoint; + case 'AWS::IAM::AssumeRolePolicyDocument': + return ValidatePolicyResourceType.awsIamAssumeRolePolicyDocument; + } + throw Exception('$this is not known in enum ValidatePolicyResourceType'); + } +} + +class ValidatePolicyResponse { + /// The list of findings in a policy returned by IAM Access Analyzer based on + /// its suite of policy checks. + final List findings; + + /// A token used for pagination of results returned. + final String? nextToken; + + ValidatePolicyResponse({ + required this.findings, + this.nextToken, + }); + + factory ValidatePolicyResponse.fromJson(Map json) { + return ValidatePolicyResponse( + findings: (json['findings'] as List) + .whereNotNull() + .map((e) => ValidatePolicyFinding.fromJson(e as Map)) + .toList(), + nextToken: json['nextToken'] as String?, + ); + } +} + +/// The proposed virtual private cloud (VPC) configuration for the Amazon S3 +/// access point. VPC configuration does not apply to multi-region access +/// points. For more information, see VpcConfiguration. +class VpcConfiguration { + /// If this field is specified, this access point will only allow connections + /// from the specified VPC ID. + final String vpcId; + + VpcConfiguration({ + required this.vpcId, + }); + + factory VpcConfiguration.fromJson(Map json) { + return VpcConfiguration( + vpcId: json['vpcId'] as String, + ); + } + + Map toJson() { + final vpcId = this.vpcId; + return { + 'vpcId': vpcId, + }; + } +} + class AccessDeniedException extends _s.GenericAwsException { AccessDeniedException({String? type, String? message}) : super(type: type, code: 'AccessDeniedException', message: message); diff --git a/generated/aws_acm_api/README.md b/generated/aws_acm_api/README.md index 5078b5b56..4b3c31094 100644 --- a/generated/aws_acm_api/README.md +++ b/generated/aws_acm_api/README.md @@ -3,7 +3,11 @@ **Generated Dart library from API specification** *About the service:* -Welcome to the AWS Certificate Manager (ACM) API documentation. +You can use Certificate Manager (ACM) to manage SSL/TLS certificates for +your Amazon Web Services-based websites and applications. For more +information about using ACM, see the Certificate Manager +User Guide. ## Links diff --git a/generated/aws_acm_api/lib/acm-2015-12-08.dart b/generated/aws_acm_api/lib/acm-2015-12-08.dart index 1f9610c63..60145acf9 100644 --- a/generated/aws_acm_api/lib/acm-2015-12-08.dart +++ b/generated/aws_acm_api/lib/acm-2015-12-08.dart @@ -18,7 +18,11 @@ import 'package:shared_aws_api/shared.dart' export 'package:shared_aws_api/shared.dart' show AwsClientCredentials; -/// Welcome to the AWS Certificate Manager (ACM) API documentation. +/// You can use Certificate Manager (ACM) to manage SSL/TLS certificates for +/// your Amazon Web Services-based websites and applications. For more +/// information about using ACM, see the Certificate Manager +/// User Guide. class ACM { final _s.JsonProtocol _protocol; ACM({ @@ -48,10 +52,10 @@ class ACM { } /// Adds one or more tags to an ACM certificate. Tags are labels that you can - /// use to identify and organize your AWS resources. Each tag consists of a - /// key and an optional value. You specify the - /// certificate on input by its Amazon Resource Name (ARN). You specify the - /// tag by using a key-value pair. + /// use to identify and organize your Amazon Web Services resources. Each tag + /// consists of a key and an optional value. You + /// specify the certificate on input by its Amazon Resource Name (ARN). You + /// specify the tag by using a key-value pair. /// /// You can apply a tag to just one certificate if you want to identify a /// specific characteristic of that certificate, or you can apply the same tag @@ -74,6 +78,7 @@ class ACM { /// May throw [TooManyTagsException]. /// May throw [TagPolicyException]. /// May throw [InvalidParameterException]. + /// May throw [ThrottlingException]. /// /// Parameter [certificateArn] : /// String that contains the ARN of the ACM certificate to which the tag is to @@ -83,7 +88,7 @@ class ACM { /// /// For more information about ARNs, see Amazon - /// Resource Names (ARNs) and AWS Service Namespaces. + /// Resource Names (ARNs). /// /// Parameter [tags] : /// The key-value pair that defines the tag. The tag value is optional. @@ -112,15 +117,18 @@ class ACM { /// succeeds, the certificate no longer appears in the list that can be /// displayed by calling the ListCertificates action or be retrieved by /// calling the GetCertificate action. The certificate will not be - /// available for use by AWS services integrated with ACM. + /// available for use by Amazon Web Services services integrated with ACM. /// - /// You cannot delete an ACM certificate that is being used by another AWS - /// service. To delete a certificate that is in use, the certificate - /// association must first be removed. + /// You cannot delete an ACM certificate that is being used by another Amazon + /// Web Services service. To delete a certificate that is in use, the + /// certificate association must first be removed. /// /// /// May throw [ResourceNotFoundException]. /// May throw [ResourceInUseException]. + /// May throw [AccessDeniedException]. + /// May throw [ThrottlingException]. + /// May throw [ConflictException]. /// May throw [InvalidArnException]. /// /// Parameter [certificateArn] : @@ -131,7 +139,7 @@ class ACM { /// /// For more information about ARNs, see Amazon - /// Resource Names (ARNs) and AWS Service Namespaces. + /// Resource Names (ARNs). Future deleteCertificate({ required String certificateArn, }) async { @@ -153,6 +161,10 @@ class ACM { /// Returns detailed metadata about the specified ACM certificate. /// + /// If you have just created a certificate using the + /// RequestCertificate action, there is a delay of several + /// seconds before you can retrieve information about it. + /// /// May throw [ResourceNotFoundException]. /// May throw [InvalidArnException]. /// @@ -164,7 +176,7 @@ class ACM { /// /// For more information about ARNs, see Amazon - /// Resource Names (ARNs) and AWS Service Namespaces. + /// Resource Names (ARNs). Future describeCertificate({ required String certificateArn, }) async { @@ -208,9 +220,14 @@ class ACM { /// arn:aws:acm:region:account:certificate/12345678-1234-1234-1234-123456789012 /// /// Parameter [passphrase] : - /// Passphrase to associate with the encrypted exported private key. If you - /// want to later decrypt the private key, you must have the passphrase. You - /// can use the following OpenSSL command to decrypt a private key: + /// Passphrase to associate with the encrypted exported private key. + /// + /// When creating your passphrase, you can use any ASCII character except #, + /// $, or %. + /// + /// If you want to later decrypt the private key, you must have the + /// passphrase. You can use the following OpenSSL command to decrypt a private + /// key. After entering the command, you are prompted for the passphrase. /// /// openssl rsa -in encrypted_key.pem -out decrypted_key.pem Future exportCertificate({ @@ -236,6 +253,27 @@ class ACM { return ExportCertificateResponse.fromJson(jsonResponse.body); } + /// Returns the account configuration options associated with an Amazon Web + /// Services account. + /// + /// May throw [AccessDeniedException]. + /// May throw [ThrottlingException]. + Future getAccountConfiguration() async { + final headers = { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'CertificateManager.GetAccountConfiguration' + }; + final jsonResponse = await _protocol.send( + method: 'POST', + requestUri: '/', + exceptionFnMap: _exceptionFns, + // TODO queryParams + headers: headers, + ); + + return GetAccountConfigurationResponse.fromJson(jsonResponse.body); + } + /// Retrieves an Amazon-issued certificate and its certificate chain. The /// chain consists of the certificate of the issuing CA and the intermediate /// certificates of any other subordinate CAs. All of the certificates are @@ -254,7 +292,7 @@ class ACM { /// /// For more information about ARNs, see Amazon - /// Resource Names (ARNs) and AWS Service Namespaces. + /// Resource Names (ARNs). Future getCertificate({ required String certificateArn, }) async { @@ -276,8 +314,8 @@ class ACM { return GetCertificateResponse.fromJson(jsonResponse.body); } - /// Imports a certificate into AWS Certificate Manager (ACM) to use with - /// services that are integrated with ACM. Note that integrated /// services allow only certificate types and keys they support to be /// associated with their resources. Further, their support differs depending @@ -285,7 +323,7 @@ class ACM { /// information, see the documentation for each service. For more information /// about importing certificates into ACM, see Importing - /// Certificates in the AWS Certificate Manager User Guide. + /// Certificates in the Certificate Manager User Guide. /// /// ACM does not provide managed @@ -303,6 +341,9 @@ class ACM { /// is protected by a password or a passphrase. /// ///
  • + /// The private key must be no larger than 5 KB (5,120 bytes). + ///
  • + ///
  • /// If the certificate you are importing is not self-signed, you must enter /// its certificate chain. ///
  • @@ -326,14 +367,14 @@ class ACM { ///
  • /// To import a new certificate, omit the CertificateArn /// argument. Include this argument only when you want to replace a previously - /// imported certifica + /// imported certificate. ///
  • ///
  • /// When you import a certificate by using the CLI, you must specify the /// certificate, the certificate chain, and the private key by their file - /// names preceded by file://. For example, you can specify a + /// names preceded by fileb://. For example, you can specify a /// certificate saved in the C:\temp folder as - /// file://C:\temp\certificate_to_import.pem. If you are making + /// fileb://C:\temp\certificate_to_import.pem. If you are making /// an HTTP or HTTPS Query request, include these arguments as BLOBs. ///
  • ///
  • @@ -357,6 +398,7 @@ class ACM { /// May throw [TooManyTagsException]. /// May throw [TagPolicyException]. /// May throw [InvalidParameterException]. + /// May throw [InvalidArnException]. /// /// Parameter [certificate] : /// The certificate to import. @@ -414,6 +456,7 @@ class ACM { /// Filters. /// /// May throw [InvalidArgsException]. + /// May throw [ValidationException]. /// /// Parameter [certificateStatuses] : /// Filter the certificate list by status value. @@ -433,11 +476,21 @@ class ACM { /// Use this parameter only when paginating results and only in a subsequent /// request after you receive a response with truncated results. Set it to the /// value of NextToken from the response you just received. + /// + /// Parameter [sortBy] : + /// Specifies the field to sort results by. If you specify + /// SortBy, you must also specify SortOrder. + /// + /// Parameter [sortOrder] : + /// Specifies the order of sorted results. If you specify + /// SortOrder, you must also specify SortBy. Future listCertificates({ List? certificateStatuses, Filters? includes, int? maxItems, String? nextToken, + SortBy? sortBy, + SortOrder? sortOrder, }) async { _s.validateNumRange( 'maxItems', @@ -462,6 +515,8 @@ class ACM { if (includes != null) 'Includes': includes, if (maxItems != null) 'MaxItems': maxItems, if (nextToken != null) 'NextToken': nextToken, + if (sortBy != null) 'SortBy': sortBy.toValue(), + if (sortOrder != null) 'SortOrder': sortOrder.toValue(), }, ); @@ -484,7 +539,7 @@ class ACM { /// /// For more information about ARNs, see Amazon - /// Resource Names (ARNs) and AWS Service Namespaces. + /// Resource Names (ARNs). Future listTagsForCertificate({ required String certificateArn, }) async { @@ -506,6 +561,50 @@ class ACM { return ListTagsForCertificateResponse.fromJson(jsonResponse.body); } + /// Adds or modifies account-level configurations in ACM. + /// + /// The supported configuration option is DaysBeforeExpiry. This + /// option specifies the number of days prior to certificate expiration when + /// ACM starts generating EventBridge events. ACM sends one event + /// per day per certificate until the certificate expires. By default, + /// accounts receive events starting 45 days before certificate expiration. + /// + /// May throw [ValidationException]. + /// May throw [ThrottlingException]. + /// May throw [AccessDeniedException]. + /// May throw [ConflictException]. + /// + /// Parameter [idempotencyToken] : + /// Customer-chosen string used to distinguish between calls to + /// PutAccountConfiguration. Idempotency tokens time out after + /// one hour. If you call PutAccountConfiguration multiple times + /// with the same unexpired idempotency token, ACM treats it as the same + /// request and returns the original result. If you change the idempotency + /// token for each call, ACM treats each call as a new request. + /// + /// Parameter [expiryEvents] : + /// Specifies expiration events associated with an account. + Future putAccountConfiguration({ + required String idempotencyToken, + ExpiryEventsConfiguration? expiryEvents, + }) async { + final headers = { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'CertificateManager.PutAccountConfiguration' + }; + await _protocol.send( + method: 'POST', + requestUri: '/', + exceptionFnMap: _exceptionFns, + // TODO queryParams + headers: headers, + payload: { + 'IdempotencyToken': idempotencyToken, + if (expiryEvents != null) 'ExpiryEvents': expiryEvents, + }, + ); + } + /// Remove one or more tags from an ACM certificate. A tag consists of a /// key-value pair. If you do not specify the value portion of the tag when /// calling this function, the tag will be removed regardless of value. If you @@ -521,6 +620,7 @@ class ACM { /// May throw [InvalidTagException]. /// May throw [TagPolicyException]. /// May throw [InvalidParameterException]. + /// May throw [ThrottlingException]. /// /// Parameter [certificateArn] : /// String that contains the ARN of the ACM Certificate with one or more tags @@ -530,7 +630,7 @@ class ACM { /// /// For more information about ARNs, see Amazon - /// Resource Names (ARNs) and AWS Service Namespaces. + /// Resource Names (ARNs). /// /// Parameter [tags] : /// The key-value pair that defines the tag to remove. @@ -555,10 +655,10 @@ class ACM { ); } - /// Renews an eligable ACM certificate. At this time, only exported private + /// Renews an eligible ACM certificate. At this time, only exported private /// certificates can be renewed with this operation. In order to renew your - /// ACM PCA certificates with ACM, you must first grant + /// Amazon Web Services Private CA certificates with ACM, you must first grant /// the ACM service principal permission to do so. For more information, /// see Testing @@ -575,7 +675,7 @@ class ACM { /// /// For more information about ARNs, see Amazon - /// Resource Names (ARNs) and AWS Service Namespaces. + /// Resource Names (ARNs). Future renewCertificate({ required String certificateArn, }) async { @@ -595,10 +695,11 @@ class ACM { ); } - /// Requests an ACM certificate for use with other AWS services. To request an - /// ACM certificate, you must specify a fully qualified domain name (FQDN) in - /// the DomainName parameter. You can also specify additional - /// FQDNs in the SubjectAlternativeNames parameter. + /// Requests an ACM certificate for use with other Amazon Web Services + /// services. To request an ACM certificate, you must specify a fully + /// qualified domain name (FQDN) in the DomainName parameter. You + /// can also specify additional FQDNs in the + /// SubjectAlternativeNames parameter. /// /// If you are requesting a private certificate, domain validation is not /// required. If you are requesting a public certificate, each domain name @@ -609,6 +710,16 @@ class ACM { /// href="https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-email.html">email /// validation. We recommend that you use DNS validation. ACM issues /// public certificates after receiving approval from the domain owner. + /// + /// ACM behavior differs from the RFC + /// 6125 specification of the certificate validation process. ACM first + /// checks for a Subject Alternative Name, and, if it finds one, ignores the + /// common name (CN). + /// + /// After successful completion of the RequestCertificate action, + /// there is a delay of several seconds before you can retrieve information + /// about the new certificate. /// /// May throw [LimitExceededException]. /// May throw [InvalidDomainValidationOptionsException]. @@ -625,9 +736,12 @@ class ACM { /// example, *.example.com protects www.example.com, site.example.com, and /// images.example.com. /// - /// The first domain name you enter cannot exceed 64 octets, including - /// periods. Each subsequent Subject Alternative Name (SAN), however, can be - /// up to 253 octets in length. + /// In compliance with RFC 5280, the + /// length of the domain name (technically, the Common Name) that you provide + /// cannot exceed 64 octets (characters), including periods. To add a longer + /// domain name, specify it in the Subject Alternative Name field, which + /// supports names up to 253 octets in length. /// /// Parameter [certificateAuthorityArn] : /// The Amazon Resource Name (ARN) of the private certificate authority (CA) @@ -635,9 +749,9 @@ class ACM { /// and you are trying to request a private certificate, ACM will attempt to /// issue a public certificate. For more information about private CAs, see /// the AWS - /// Certificate Manager Private Certificate Authority (PCA) user guide. - /// The ARN must have the following form: + /// href="https://docs.aws.amazon.com/privateca/latest/userguide/PcaWelcome.html">Amazon + /// Web Services Private Certificate Authority user guide. The ARN must + /// have the following form: /// /// arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 /// @@ -654,6 +768,20 @@ class ACM { /// change the idempotency token for each call, ACM recognizes that you are /// requesting multiple certificates. /// + /// Parameter [keyAlgorithm] : + /// Specifies the algorithm of the public and private key pair that your + /// certificate uses to encrypt data. RSA is the default key algorithm for ACM + /// certificates. Elliptic Curve Digital Signature Algorithm (ECDSA) keys are + /// smaller, offering security comparable to RSA keys but with greater + /// computing efficiency. However, ECDSA is not supported by all network + /// clients. Some AWS services may require RSA keys, or only support ECDSA + /// keys of a particular size, while others allow the use of either RSA and + /// ECDSA keys to ensure that compatibility is not broken. Check the + /// requirements for the AWS service where you plan to deploy your + /// certificate. + /// + /// Default: RSA_2048 + /// /// Parameter [options] : /// Currently, you can use this parameter to specify whether to add the /// certificate to a certificate transparency log. Certificate transparency @@ -710,6 +838,7 @@ class ACM { String? certificateAuthorityArn, List? domainValidationOptions, String? idempotencyToken, + KeyAlgorithm? keyAlgorithm, CertificateOptions? options, List? subjectAlternativeNames, List? tags, @@ -732,6 +861,7 @@ class ACM { if (domainValidationOptions != null) 'DomainValidationOptions': domainValidationOptions, if (idempotencyToken != null) 'IdempotencyToken': idempotencyToken, + if (keyAlgorithm != null) 'KeyAlgorithm': keyAlgorithm.toValue(), if (options != null) 'Options': options, if (subjectAlternativeNames != null) 'SubjectAlternativeNames': subjectAlternativeNames, @@ -877,18 +1007,17 @@ class CertificateDetail { /// The Amazon Resource Name (ARN) of the certificate. For more information /// about ARNs, see Amazon - /// Resource Names (ARNs) and AWS Service Namespaces in the AWS General + /// Resource Names (ARNs) in the Amazon Web Services General /// Reference. final String? certificateArn; - /// The Amazon Resource Name (ARN) of the ACM PCA private certificate authority - /// (CA) that issued the certificate. This has the following format: + /// The Amazon Resource Name (ARN) of the private certificate authority (CA) + /// that issued the certificate. This has the following format: /// /// arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 final String? certificateAuthorityArn; - /// The time at which the certificate was requested. This value exists only when - /// the certificate type is AMAZON_ISSUED. + /// The time at which the certificate was requested. final DateTime? createdAt; /// The fully qualified domain name for the certificate, such as www.example.com @@ -908,15 +1037,16 @@ class CertificateDetail { /// The reason the certificate request failed. This value exists only when the /// certificate status is FAILED. For more information, see Certificate - /// Request Failed in the AWS Certificate Manager User Guide. + /// Request Failed in the Certificate Manager User Guide. final FailureReason? failureReason; - /// The date and time at which the certificate was imported. This value exists - /// only when the certificate type is IMPORTED. + /// The date and time when the certificate was imported. This value exists only + /// when the certificate type is IMPORTED. final DateTime? importedAt; - /// A list of ARNs for the AWS resources that are using the certificate. A - /// certificate can be used by multiple AWS resources. + /// A list of ARNs for the Amazon Web Services resources that are using the + /// certificate. A certificate can be used by multiple Amazon Web Services + /// resources. final List? inUseBy; /// The time at which the certificate was issued. This value exists only when @@ -975,6 +1105,18 @@ class CertificateDetail { final String? signatureAlgorithm; /// The status of the certificate. + /// + /// A certificate enters status PENDING_VALIDATION upon being requested, unless + /// it fails for any of the reasons given in the troubleshooting topic Certificate + /// request fails. ACM makes repeated attempts to validate a certificate for + /// 72 hours and then times out. If a certificate shows status FAILED or + /// VALIDATION_TIMED_OUT, delete the request, correct the issue with DNS + /// validation or Email + /// validation, and try again. If validation succeeds, the certificate + /// enters status ISSUED. final CertificateStatus? status; /// The name of the entity that is associated with the public key contained in @@ -997,7 +1139,7 @@ class CertificateDetail { /// differences between certificates that you import and those that ACM /// provides, see Importing - /// Certificates in the AWS Certificate Manager User Guide. + /// Certificates in the Certificate Manager User Guide. final CertificateType? type; CertificateDetail({ @@ -1028,6 +1170,7 @@ class CertificateDetail { this.subjectAlternativeNames, this.type, }); + factory CertificateDetail.fromJson(Map json) { return CertificateDetail( certificateArn: json['CertificateArn'] as String?, @@ -1100,6 +1243,7 @@ class CertificateOptions { CertificateOptions({ this.certificateTransparencyLoggingPreference, }); + factory CertificateOptions.fromJson(Map json) { return CertificateOptions( certificateTransparencyLoggingPreference: @@ -1181,21 +1325,165 @@ class CertificateSummary { /// /// For more information about ARNs, see Amazon - /// Resource Names (ARNs) and AWS Service Namespaces. + /// Resource Names (ARNs). final String? certificateArn; + /// The time at which the certificate was requested. + final DateTime? createdAt; + /// Fully qualified domain name (FQDN), such as www.example.com or example.com, /// for the certificate. final String? domainName; + /// Indicates whether the certificate has been exported. This value exists only + /// when the certificate type is PRIVATE. + final bool? exported; + + /// Contains a list of Extended Key Usage X.509 v3 extension objects. Each + /// object specifies a purpose for which the certificate public key can be used + /// and consists of a name and an object identifier (OID). + final List? extendedKeyUsages; + + /// When called by ListCertificates, + /// indicates whether the full list of subject alternative names has been + /// included in the response. If false, the response includes all of the subject + /// alternative names included in the certificate. If true, the response only + /// includes the first 100 subject alternative names included in the + /// certificate. To display the full list of subject alternative names, use DescribeCertificate. + final bool? hasAdditionalSubjectAlternativeNames; + + /// The date and time when the certificate was imported. This value exists only + /// when the certificate type is IMPORTED. + final DateTime? importedAt; + + /// Indicates whether the certificate is currently in use by any Amazon Web + /// Services resources. + final bool? inUse; + + /// The time at which the certificate was issued. This value exists only when + /// the certificate type is AMAZON_ISSUED. + final DateTime? issuedAt; + + /// The algorithm that was used to generate the public-private key pair. + final KeyAlgorithm? keyAlgorithm; + + /// A list of Key Usage X.509 v3 extension objects. Each object is a string + /// value that identifies the purpose of the public key contained in the + /// certificate. Possible extension values include DIGITAL_SIGNATURE, + /// KEY_ENCHIPHERMENT, NON_REPUDIATION, and more. + final List? keyUsages; + + /// The time after which the certificate is not valid. + final DateTime? notAfter; + + /// The time before which the certificate is not valid. + final DateTime? notBefore; + + /// Specifies whether the certificate is eligible for renewal. At this time, + /// only exported private certificates can be renewed with the + /// RenewCertificate command. + final RenewalEligibility? renewalEligibility; + + /// The time at which the certificate was revoked. This value exists only when + /// the certificate status is REVOKED. + final DateTime? revokedAt; + + /// The status of the certificate. + /// + /// A certificate enters status PENDING_VALIDATION upon being requested, unless + /// it fails for any of the reasons given in the troubleshooting topic Certificate + /// request fails. ACM makes repeated attempts to validate a certificate for + /// 72 hours and then times out. If a certificate shows status FAILED or + /// VALIDATION_TIMED_OUT, delete the request, correct the issue with DNS + /// validation or Email + /// validation, and try again. If validation succeeds, the certificate + /// enters status ISSUED. + final CertificateStatus? status; + + /// One or more domain names (subject alternative names) included in the + /// certificate. This list contains the domain names that are bound to the + /// public key that is contained in the certificate. The subject alternative + /// names include the canonical domain name (CN) of the certificate and + /// additional domain names that can be used to connect to the website. + /// + /// When called by ListCertificates, + /// this parameter will only return the first 100 subject alternative names + /// included in the certificate. To display the full list of subject alternative + /// names, use DescribeCertificate. + final List? subjectAlternativeNameSummaries; + + /// The source of the certificate. For certificates provided by ACM, this value + /// is AMAZON_ISSUED. For certificates that you imported with + /// ImportCertificate, this value is IMPORTED. ACM does not + /// provide managed + /// renewal for imported certificates. For more information about the + /// differences between certificates that you import and those that ACM + /// provides, see Importing + /// Certificates in the Certificate Manager User Guide. + final CertificateType? type; + CertificateSummary({ this.certificateArn, + this.createdAt, this.domainName, + this.exported, + this.extendedKeyUsages, + this.hasAdditionalSubjectAlternativeNames, + this.importedAt, + this.inUse, + this.issuedAt, + this.keyAlgorithm, + this.keyUsages, + this.notAfter, + this.notBefore, + this.renewalEligibility, + this.revokedAt, + this.status, + this.subjectAlternativeNameSummaries, + this.type, }); + factory CertificateSummary.fromJson(Map json) { return CertificateSummary( certificateArn: json['CertificateArn'] as String?, + createdAt: timeStampFromJson(json['CreatedAt']), domainName: json['DomainName'] as String?, + exported: json['Exported'] as bool?, + extendedKeyUsages: (json['ExtendedKeyUsages'] as List?) + ?.whereNotNull() + .map((e) => (e as String).toExtendedKeyUsageName()) + .toList(), + hasAdditionalSubjectAlternativeNames: + json['HasAdditionalSubjectAlternativeNames'] as bool?, + importedAt: timeStampFromJson(json['ImportedAt']), + inUse: json['InUse'] as bool?, + issuedAt: timeStampFromJson(json['IssuedAt']), + keyAlgorithm: (json['KeyAlgorithm'] as String?)?.toKeyAlgorithm(), + keyUsages: (json['KeyUsages'] as List?) + ?.whereNotNull() + .map((e) => (e as String).toKeyUsageName()) + .toList(), + notAfter: timeStampFromJson(json['NotAfter']), + notBefore: timeStampFromJson(json['NotBefore']), + renewalEligibility: + (json['RenewalEligibility'] as String?)?.toRenewalEligibility(), + revokedAt: timeStampFromJson(json['RevokedAt']), + status: (json['Status'] as String?)?.toCertificateStatus(), + subjectAlternativeNameSummaries: + (json['SubjectAlternativeNameSummaries'] as List?) + ?.whereNotNull() + .map((e) => e as String) + .toList(), + type: (json['Type'] as String?)?.toCertificateType(), ); } } @@ -1271,6 +1559,7 @@ class DescribeCertificateResponse { DescribeCertificateResponse({ this.certificate, }); + factory DescribeCertificateResponse.fromJson(Map json) { return DescribeCertificateResponse( certificate: json['Certificate'] != null @@ -1366,6 +1655,7 @@ class DomainValidation { this.validationMethod, this.validationStatus, }); + factory DomainValidation.fromJson(Map json) { return DomainValidation( domainName: json['DomainName'] as String, @@ -1432,6 +1722,33 @@ class DomainValidationOption { } } +/// Object containing expiration events options associated with an Amazon Web +/// Services account. +class ExpiryEventsConfiguration { + /// Specifies the number of days prior to certificate expiration when ACM starts + /// generating EventBridge events. ACM sends one event per day per + /// certificate until the certificate expires. By default, accounts receive + /// events starting 45 days before certificate expiration. + final int? daysBeforeExpiry; + + ExpiryEventsConfiguration({ + this.daysBeforeExpiry, + }); + + factory ExpiryEventsConfiguration.fromJson(Map json) { + return ExpiryEventsConfiguration( + daysBeforeExpiry: json['DaysBeforeExpiry'] as int?, + ); + } + + Map toJson() { + final daysBeforeExpiry = this.daysBeforeExpiry; + return { + if (daysBeforeExpiry != null) 'DaysBeforeExpiry': daysBeforeExpiry, + }; + } +} + class ExportCertificateResponse { /// The base64 PEM-encoded certificate. final String? certificate; @@ -1449,6 +1766,7 @@ class ExportCertificateResponse { this.certificateChain, this.privateKey, }); + factory ExportCertificateResponse.fromJson(Map json) { return ExportCertificateResponse( certificate: json['Certificate'] as String?, @@ -1504,6 +1822,7 @@ class ExtendedKeyUsage { this.name, this.oid, }); + factory ExtendedKeyUsage.fromJson(Map json) { return ExtendedKeyUsage( name: (json['Name'] as String?)?.toExtendedKeyUsageName(), @@ -1701,10 +2020,11 @@ class Filters { /// Specify one or more algorithms that can be used to generate key pairs. /// - /// Default filtering returns only RSA_2048 certificates. To return + /// Default filtering returns only RSA_1024 and + /// RSA_2048 certificates that have at least one domain. To return /// other certificate types, provide the desired type signatures in a /// comma-separated list. For example, "keyTypes": - /// ["RSA_2048,RSA_4096"] returns both RSA_2048 and + /// ["RSA_2048","RSA_4096"] returns both RSA_2048 and /// RSA_4096 certificates. final List? keyTypes; @@ -1731,6 +2051,25 @@ class Filters { } } +class GetAccountConfigurationResponse { + /// Expiration events configuration options associated with the Amazon Web + /// Services account. + final ExpiryEventsConfiguration? expiryEvents; + + GetAccountConfigurationResponse({ + this.expiryEvents, + }); + + factory GetAccountConfigurationResponse.fromJson(Map json) { + return GetAccountConfigurationResponse( + expiryEvents: json['ExpiryEvents'] != null + ? ExpiryEventsConfiguration.fromJson( + json['ExpiryEvents'] as Map) + : null, + ); + } +} + class GetCertificateResponse { /// The ACM-issued certificate corresponding to the ARN specified as input. final String? certificate; @@ -1744,6 +2083,7 @@ class GetCertificateResponse { this.certificate, this.certificateChain, }); + factory GetCertificateResponse.fromJson(Map json) { return GetCertificateResponse( certificate: json['Certificate'] as String?, @@ -1761,6 +2101,7 @@ class ImportCertificateResponse { ImportCertificateResponse({ this.certificateArn, }); + factory ImportCertificateResponse.fromJson(Map json) { return ImportCertificateResponse( certificateArn: json['CertificateArn'] as String?, @@ -1769,8 +2110,9 @@ class ImportCertificateResponse { } enum KeyAlgorithm { - rsa_2048, rsa_1024, + rsa_2048, + rsa_3072, rsa_4096, ecPrime256v1, ecSecp384r1, @@ -1780,10 +2122,12 @@ enum KeyAlgorithm { extension KeyAlgorithmValueExtension on KeyAlgorithm { String toValue() { switch (this) { - case KeyAlgorithm.rsa_2048: - return 'RSA_2048'; case KeyAlgorithm.rsa_1024: return 'RSA_1024'; + case KeyAlgorithm.rsa_2048: + return 'RSA_2048'; + case KeyAlgorithm.rsa_3072: + return 'RSA_3072'; case KeyAlgorithm.rsa_4096: return 'RSA_4096'; case KeyAlgorithm.ecPrime256v1: @@ -1799,10 +2143,12 @@ extension KeyAlgorithmValueExtension on KeyAlgorithm { extension KeyAlgorithmFromString on String { KeyAlgorithm toKeyAlgorithm() { switch (this) { - case 'RSA_2048': - return KeyAlgorithm.rsa_2048; case 'RSA_1024': return KeyAlgorithm.rsa_1024; + case 'RSA_2048': + return KeyAlgorithm.rsa_2048; + case 'RSA_3072': + return KeyAlgorithm.rsa_3072; case 'RSA_4096': return KeyAlgorithm.rsa_4096; case 'EC_prime256v1': @@ -1825,6 +2171,7 @@ class KeyUsage { KeyUsage({ this.name, }); + factory KeyUsage.fromJson(Map json) { return KeyUsage( name: (json['Name'] as String?)?.toKeyUsageName(), @@ -1918,6 +2265,7 @@ class ListCertificatesResponse { this.certificateSummaryList, this.nextToken, }); + factory ListCertificatesResponse.fromJson(Map json) { return ListCertificatesResponse( certificateSummaryList: (json['CertificateSummaryList'] as List?) @@ -1936,6 +2284,7 @@ class ListTagsForCertificateResponse { ListTagsForCertificateResponse({ this.tags, }); + factory ListTagsForCertificateResponse.fromJson(Map json) { return ListTagsForCertificateResponse( tags: (json['Tags'] as List?) @@ -2065,6 +2414,7 @@ class RenewalSummary { required this.updatedAt, this.renewalStatusReason, }); + factory RenewalSummary.fromJson(Map json) { return RenewalSummary( domainValidationOptions: (json['DomainValidationOptions'] as List) @@ -2089,6 +2439,7 @@ class RequestCertificateResponse { RequestCertificateResponse({ this.certificateArn, }); + factory RequestCertificateResponse.fromJson(Map json) { return RequestCertificateResponse( certificateArn: json['CertificateArn'] as String?, @@ -2096,9 +2447,8 @@ class RequestCertificateResponse { } } -/// Contains a DNS record value that you can use to can use to validate -/// ownership or control of a domain. This is used by the -/// DescribeCertificate action. +/// Contains a DNS record value that you can use to validate ownership or +/// control of a domain. This is used by the DescribeCertificate action. class ResourceRecord { /// The name of the DNS record to create in your domain. This is supplied by /// ACM. @@ -2116,6 +2466,7 @@ class ResourceRecord { required this.type, required this.value, }); + factory ResourceRecord.fromJson(Map json) { return ResourceRecord( name: json['Name'] as String, @@ -2193,6 +2544,57 @@ extension RevocationReasonFromString on String { } } +enum SortBy { + createdAt, +} + +extension SortByValueExtension on SortBy { + String toValue() { + switch (this) { + case SortBy.createdAt: + return 'CREATED_AT'; + } + } +} + +extension SortByFromString on String { + SortBy toSortBy() { + switch (this) { + case 'CREATED_AT': + return SortBy.createdAt; + } + throw Exception('$this is not known in enum SortBy'); + } +} + +enum SortOrder { + ascending, + descending, +} + +extension SortOrderValueExtension on SortOrder { + String toValue() { + switch (this) { + case SortOrder.ascending: + return 'ASCENDING'; + case SortOrder.descending: + return 'DESCENDING'; + } + } +} + +extension SortOrderFromString on String { + SortOrder toSortOrder() { + switch (this) { + case 'ASCENDING': + return SortOrder.ascending; + case 'DESCENDING': + return SortOrder.descending; + } + throw Exception('$this is not known in enum SortOrder'); + } +} + /// A key-value pair that identifies or specifies metadata about an ACM /// resource. class Tag { @@ -2206,6 +2608,7 @@ class Tag { required this.key, this.value, }); + factory Tag.fromJson(Map json) { return Tag( key: json['Key'] as String, @@ -2251,6 +2654,16 @@ extension ValidationMethodFromString on String { } } +class AccessDeniedException extends _s.GenericAwsException { + AccessDeniedException({String? type, String? message}) + : super(type: type, code: 'AccessDeniedException', message: message); +} + +class ConflictException extends _s.GenericAwsException { + ConflictException({String? type, String? message}) + : super(type: type, code: 'ConflictException', message: message); +} + class InvalidArgsException extends _s.GenericAwsException { InvalidArgsException({String? type, String? message}) : super(type: type, code: 'InvalidArgsException', message: message); @@ -2309,12 +2722,26 @@ class TagPolicyException extends _s.GenericAwsException { : super(type: type, code: 'TagPolicyException', message: message); } +class ThrottlingException extends _s.GenericAwsException { + ThrottlingException({String? type, String? message}) + : super(type: type, code: 'ThrottlingException', message: message); +} + class TooManyTagsException extends _s.GenericAwsException { TooManyTagsException({String? type, String? message}) : super(type: type, code: 'TooManyTagsException', message: message); } +class ValidationException extends _s.GenericAwsException { + ValidationException({String? type, String? message}) + : super(type: type, code: 'ValidationException', message: message); +} + final _exceptionFns = { + 'AccessDeniedException': (type, message) => + AccessDeniedException(type: type, message: message), + 'ConflictException': (type, message) => + ConflictException(type: type, message: message), 'InvalidArgsException': (type, message) => InvalidArgsException(type: type, message: message), 'InvalidArnException': (type, message) => @@ -2337,6 +2764,10 @@ final _exceptionFns = { ResourceNotFoundException(type: type, message: message), 'TagPolicyException': (type, message) => TagPolicyException(type: type, message: message), + 'ThrottlingException': (type, message) => + ThrottlingException(type: type, message: message), 'TooManyTagsException': (type, message) => TooManyTagsException(type: type, message: message), + 'ValidationException': (type, message) => + ValidationException(type: type, message: message), }; diff --git a/generated/aws_acm_pca_api/README.md b/generated/aws_acm_pca_api/README.md index 16d42b52c..931e025e7 100644 --- a/generated/aws_acm_pca_api/README.md +++ b/generated/aws_acm_pca_api/README.md @@ -3,22 +3,32 @@ **Generated Dart library from API specification** *About the service:* -This is the ACM Private CA API Reference. It provides descriptions, -syntax, and usage examples for each of the actions and data types involved -in creating and managing private certificate authorities (CA) for your -organization. +This is the Amazon Web Services Private Certificate Authority API +Reference. It provides descriptions, syntax, and usage examples for each +of the actions and data types involved in creating and managing a private +certificate authority (CA) for your organization. -The documentation for each action shows the Query API request parameters and -the XML response. Alternatively, you can use one of the AWS SDKs to access -an API that's tailored to the programming language or platform that you're -using. For more information, see AWS SDKs. - -Each ACM Private CA API action has a quota that determines the number of -times the action can be called per second. For more information, see API -Rate Quotas in ACM Private CA in the ACM Private CA user guide. - +The documentation for each action shows the API request parameters and the +JSON response. Alternatively, you can use one of the Amazon Web Services +SDKs to access an API that is tailored to the programming language or +platform that you prefer. For more information, see Amazon Web Services SDKs. + +Each Amazon Web Services Private CA API operation has a quota that +determines the number of times the operation can be called per second. +Amazon Web Services Private CA throttles API requests at different rates +depending on the operation. Throttling means that Amazon Web Services +Private CA rejects an otherwise valid request because the request exceeds +the operation's quota for the number of requests per second. When a request +is throttled, Amazon Web Services Private CA returns a ThrottlingException +error. Amazon Web Services Private CA does not guarantee a minimum request +rate for APIs. + +To see an up-to-date list of your Amazon Web Services Private CA quotas, or +to request a quota increase, log into your Amazon Web Services account and +visit the Service +Quotas console. ## Links diff --git a/generated/aws_acm_pca_api/lib/acm-pca-2017-08-22.dart b/generated/aws_acm_pca_api/lib/acm-pca-2017-08-22.dart index 657394850..d0805c19b 100644 --- a/generated/aws_acm_pca_api/lib/acm-pca-2017-08-22.dart +++ b/generated/aws_acm_pca_api/lib/acm-pca-2017-08-22.dart @@ -18,22 +18,32 @@ import 'package:shared_aws_api/shared.dart' export 'package:shared_aws_api/shared.dart' show AwsClientCredentials; -/// This is the ACM Private CA API Reference. It provides descriptions, -/// syntax, and usage examples for each of the actions and data types involved -/// in creating and managing private certificate authorities (CA) for your -/// organization. +/// This is the Amazon Web Services Private Certificate Authority API +/// Reference. It provides descriptions, syntax, and usage examples for each +/// of the actions and data types involved in creating and managing a private +/// certificate authority (CA) for your organization. /// -/// The documentation for each action shows the Query API request parameters and -/// the XML response. Alternatively, you can use one of the AWS SDKs to access -/// an API that's tailored to the programming language or platform that you're -/// using. For more information, see AWS SDKs. -/// -/// Each ACM Private CA API action has a quota that determines the number of -/// times the action can be called per second. For more information, see API -/// Rate Quotas in ACM Private CA in the ACM Private CA user guide. -/// +/// The documentation for each action shows the API request parameters and the +/// JSON response. Alternatively, you can use one of the Amazon Web Services +/// SDKs to access an API that is tailored to the programming language or +/// platform that you prefer. For more information, see Amazon Web Services SDKs. +/// +/// Each Amazon Web Services Private CA API operation has a quota that +/// determines the number of times the operation can be called per second. +/// Amazon Web Services Private CA throttles API requests at different rates +/// depending on the operation. Throttling means that Amazon Web Services +/// Private CA rejects an otherwise valid request because the request exceeds +/// the operation's quota for the number of requests per second. When a request +/// is throttled, Amazon Web Services Private CA returns a ThrottlingException +/// error. Amazon Web Services Private CA does not guarantee a minimum request +/// rate for APIs. +/// +/// To see an up-to-date list of your Amazon Web Services Private CA quotas, or +/// to request a quota increase, log into your Amazon Web Services account and +/// visit the Service +/// Quotas console. class ACMPCA { final _s.JsonProtocol _protocol; ACMPCA({ @@ -63,29 +73,30 @@ class ACMPCA { } /// Creates a root or subordinate private certificate authority (CA). You must - /// specify the CA configuration, the certificate revocation list (CRL) - /// configuration, the CA type, and an optional idempotency token to avoid - /// accidental creation of multiple CAs. The CA configuration specifies the - /// name of the algorithm and key size to be used to create the CA private - /// key, the type of signing algorithm that the CA uses, and X.500 subject - /// information. The CRL configuration specifies the CRL expiration period in + /// specify the CA configuration, an optional configuration for Online + /// Certificate Status Protocol (OCSP) and/or a certificate revocation list + /// (CRL), the CA type, and an optional idempotency token to avoid accidental + /// creation of multiple CAs. The CA configuration specifies the name of the + /// algorithm and key size to be used to create the CA private key, the type + /// of signing algorithm that the CA uses, and X.500 subject information. The + /// OCSP configuration can optionally specify a custom URL for the OCSP + /// responder. The CRL configuration specifies the CRL expiration period in /// days (the validity period of the CRL), the Amazon S3 bucket that will /// contain the CRL, and a CNAME alias for the S3 bucket that is included in /// certificates issued by the CA. If successful, this action returns the /// Amazon Resource Name (ARN) of the CA. - /// - /// ACM Private CAA assets that are stored in Amazon S3 can be protected with - /// encryption. For more information, see Encrypting - /// Your CRLs. /// - /// Both PCA and the IAM principal must have permission to write to the S3 - /// bucket that you specify. If the IAM principal making the call does not - /// have permission to write to the bucket, then an exception is thrown. For - /// more information, see Configure - /// Access to ACM Private CA. + /// Both Amazon Web Services Private CA and the IAM principal must have + /// permission to write to the S3 bucket that you specify. If the IAM + /// principal making the call does not have permission to write to the bucket, + /// then an exception is thrown. For more information, see Access + /// policies for CRLs in Amazon S3. /// + /// Amazon Web Services Private CA assets that are stored in Amazon S3 can be + /// protected with encryption. For more information, see Encrypting + /// Your CRLs. /// /// May throw [InvalidArgsException]. /// May throw [InvalidPolicyException]. @@ -100,21 +111,77 @@ class ACMPCA { /// The type of the certificate authority. /// /// Parameter [idempotencyToken] : - /// Alphanumeric string that can be used to distinguish between calls to - /// CreateCertificateAuthority. For a given token, ACM Private CA - /// creates exactly one CA. If you issue a subsequent call using the same - /// token, ACM Private CA returns the ARN of the existing CA and takes no - /// further action. If you change the idempotency token across multiple calls, - /// ACM Private CA creates a unique CA for each unique token. + /// Custom string that can be used to distinguish between calls to the + /// CreateCertificateAuthority action. Idempotency tokens for + /// CreateCertificateAuthority time out after five minutes. Therefore, + /// if you call CreateCertificateAuthority multiple times with the same + /// idempotency token within five minutes, Amazon Web Services Private CA + /// recognizes that you are requesting only certificate authority and will + /// issue only one. If you change the idempotency token for each call, Amazon + /// Web Services Private CA recognizes that you are requesting multiple + /// certificate authorities. + /// + /// Parameter [keyStorageSecurityStandard] : + /// Specifies a cryptographic key management compliance standard used for + /// handling CA keys. + /// + /// Default: FIPS_140_2_LEVEL_3_OR_HIGHER + /// + /// Note: FIPS_140_2_LEVEL_3_OR_HIGHER is not supported in + /// the following Regions: + /// + ///
      + ///
    • + /// ap-northeast-3 + ///
    • + ///
    • + /// ap-southeast-3 + ///
    • + ///
    + /// When creating a CA in these Regions, you must provide + /// FIPS_140_2_LEVEL_2_OR_HIGHER as the argument for + /// KeyStorageSecurityStandard. Failure to do this results in an + /// InvalidArgsException with the message, "A certificate + /// authority cannot be created in this region with the specified security + /// standard." /// /// Parameter [revocationConfiguration] : - /// Contains a Boolean value that you can use to enable a certification - /// revocation list (CRL) for the CA, the name of the S3 bucket to which ACM - /// Private CA will write the CRL, and an optional CNAME alias that you can - /// use to hide the name of your bucket in the CRL Distribution Points - /// extension of your CA certificate. For more information, see the CrlConfiguration - /// structure. + /// Contains information to enable Online Certificate Status Protocol (OCSP) + /// support, to enable a certificate revocation list (CRL), to enable both, or + /// to enable neither. The default is for both certificate validation + /// mechanisms to be disabled. + /// + /// The following requirements apply to revocation configurations. + /// + ///
      + ///
    • + /// A configuration disabling CRLs or OCSP must contain only the + /// Enabled=False parameter, and will fail if other parameters + /// such as CustomCname or ExpirationInDays are + /// included. + ///
    • + ///
    • + /// In a CRL configuration, the S3BucketName parameter must + /// conform to Amazon + /// S3 bucket naming rules. + ///
    • + ///
    • + /// A configuration containing a custom Canonical Name (CNAME) parameter for + /// CRLs or OCSP must conform to RFC2396 restrictions on + /// the use of special characters in a CNAME. + ///
    • + ///
    • + /// In a CRL or OCSP configuration, the value of a CNAME parameter must not + /// include a protocol prefix such as "http://" or "https://". + ///
    • + ///
    + /// For more information, see the OcspConfiguration + /// and CrlConfiguration + /// types. /// /// Parameter [tags] : /// Key-value pairs that will be attached to the new private CA. You can @@ -122,13 +189,23 @@ class ACMPCA { /// IAM to manage permissions, see Controlling /// Access Using IAM Tags. + /// + /// Parameter [usageMode] : + /// Specifies whether the CA issues general-purpose certificates that + /// typically require a revocation mechanism, or short-lived certificates that + /// may optionally omit revocation because they expire quickly. Short-lived + /// certificate validity is limited to seven days. + /// + /// The default value is GENERAL_PURPOSE. Future createCertificateAuthority({ required CertificateAuthorityConfiguration certificateAuthorityConfiguration, required CertificateAuthorityType certificateAuthorityType, String? idempotencyToken, + KeyStorageSecurityStandard? keyStorageSecurityStandard, RevocationConfiguration? revocationConfiguration, List? tags, + CertificateAuthorityUsageMode? usageMode, }) async { final headers = { 'Content-Type': 'application/x-amz-json-1.1', @@ -144,9 +221,12 @@ class ACMPCA { 'CertificateAuthorityConfiguration': certificateAuthorityConfiguration, 'CertificateAuthorityType': certificateAuthorityType.toValue(), if (idempotencyToken != null) 'IdempotencyToken': idempotencyToken, + if (keyStorageSecurityStandard != null) + 'KeyStorageSecurityStandard': keyStorageSecurityStandard.toValue(), if (revocationConfiguration != null) 'RevocationConfiguration': revocationConfiguration, if (tags != null) 'Tags': tags, + if (usageMode != null) 'UsageMode': usageMode.toValue(), }, ); @@ -156,22 +236,25 @@ class ACMPCA { /// Creates an audit report that lists every time that your CA private key is /// used. The report is saved in the Amazon S3 bucket that you specify on /// input. The IssueCertificate + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_IssueCertificate.html">IssueCertificate /// and RevokeCertificate + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_RevokeCertificate.html">RevokeCertificate /// actions use the private key. /// - /// Both PCA and the IAM principal must have permission to write to the S3 - /// bucket that you specify. If the IAM principal making the call does not - /// have permission to write to the bucket, then an exception is thrown. For - /// more information, see Configure - /// Access to ACM Private CA. + /// Both Amazon Web Services Private CA and the IAM principal must have + /// permission to write to the S3 bucket that you specify. If the IAM + /// principal making the call does not have permission to write to the bucket, + /// then an exception is thrown. For more information, see Access + /// policies for CRLs in Amazon S3. /// - /// ACM Private CAA assets that are stored in Amazon S3 can be protected with - /// encryption. For more information, see Encrypting + /// Amazon Web Services Private CA assets that are stored in Amazon S3 can be + /// protected with encryption. For more information, see Encrypting /// Your Audit Reports. + /// + /// You can generate a maximum of one report every 30 minutes. + /// /// /// May throw [RequestInProgressException]. /// May throw [RequestFailedException]. @@ -220,15 +303,15 @@ class ACMPCA { jsonResponse.body); } - /// Grants one or more permissions on a private CA to the AWS Certificate - /// Manager (ACM) service principal (acm.amazonaws.com). These + /// Grants one or more permissions on a private CA to the Certificate Manager + /// (ACM) service principal (acm.amazonaws.com). These /// permissions allow ACM to issue and renew ACM certificates that reside in - /// the same AWS account as the CA. + /// the same Amazon Web Services account as the CA. /// /// You can list current permissions with the ListPermissions + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListPermissions.html">ListPermissions /// action and revoke them with the DeletePermission + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_DeletePermission.html">DeletePermission /// action. ///

    About Permissions /// @@ -247,8 +330,8 @@ class ACMPCA { /// then permissions cannot be used to enable automatic renewals. Instead, the /// ACM certificate owner must set up a resource-based policy to enable /// cross-account issuance and renewals. For more information, see Using - /// a Resource Based Policy with ACM Private CA. + /// href="https://docs.aws.amazon.com/privateca/latest/userguide/pca-rbp.html">Using + /// a Resource Based Policy with Amazon Web Services Private CA. ///

  • /// /// @@ -260,22 +343,22 @@ class ACMPCA { /// May throw [RequestFailedException]. /// /// Parameter [actions] : - /// The actions that the specified AWS service principal can use. These - /// include IssueCertificate, GetCertificate, and - /// ListPermissions. + /// The actions that the specified Amazon Web Services service principal can + /// use. These include IssueCertificate, + /// GetCertificate, and ListPermissions. /// /// Parameter [certificateAuthorityArn] : /// The Amazon Resource Name (ARN) of the CA that grants the permissions. You /// can find the ARN by calling the ListCertificateAuthorities + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities /// action. This must have the following form: /// /// arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 /// . /// /// Parameter [principal] : - /// The AWS service or identity that receives the permission. At this time, - /// the only valid principal is acm.amazonaws.com. + /// The Amazon Web Services service or identity that receives the permission. + /// At this time, the only valid principal is acm.amazonaws.com. /// /// Parameter [sourceAccount] : /// The ID of the calling account. @@ -307,7 +390,7 @@ class ACMPCA { /// Deletes a private certificate authority (CA). You must provide the Amazon /// Resource Name (ARN) of the private CA that you want to delete. You can /// find the ARN by calling the ListCertificateAuthorities + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities /// action. /// /// Deleting a CA will invalidate other CAs and certificates below it in your @@ -315,28 +398,28 @@ class ACMPCA { /// /// Before you can delete a CA that you have created and activated, you must /// disable it. To do this, call the UpdateCertificateAuthority + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_UpdateCertificateAuthority.html">UpdateCertificateAuthority /// action and set the CertificateAuthorityStatus parameter to /// DISABLED. /// /// Additionally, you can delete a CA if you are waiting for it to be created /// (that is, the status of the CA is CREATING). You can also /// delete it if the CA has been created but you haven't yet imported the - /// signed certificate into ACM Private CA (that is, the status of the CA is - /// PENDING_CERTIFICATE). + /// signed certificate into Amazon Web Services Private CA (that is, the + /// status of the CA is PENDING_CERTIFICATE). /// /// When you successfully call DeleteCertificateAuthority, + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_DeleteCertificateAuthority.html">DeleteCertificateAuthority, /// the CA's status changes to DELETED. However, the CA won't be /// permanently deleted until the restoration period has passed. By default, /// if you do not set the PermanentDeletionTimeInDays parameter, /// the CA remains restorable for 30 days. You can set the parameter from 7 to /// 30 days. The DescribeCertificateAuthority + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_DescribeCertificateAuthority.html">DescribeCertificateAuthority /// action returns the time remaining in the restoration window of a private /// CA in the DELETED state. To restore an eligible CA, call the /// RestoreCertificateAuthority + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_RestoreCertificateAuthority.html">RestoreCertificateAuthority /// action. /// /// May throw [ConcurrentModificationException]. @@ -346,7 +429,7 @@ class ACMPCA { /// /// Parameter [certificateAuthorityArn] : /// The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority. /// This must have the following form: /// /// arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 @@ -383,17 +466,18 @@ class ACMPCA { ); } - /// Revokes permissions on a private CA granted to the AWS Certificate Manager + /// Revokes permissions on a private CA granted to the Certificate Manager /// (ACM) service principal (acm.amazonaws.com). /// /// These permissions allow ACM to issue and renew ACM certificates that - /// reside in the same AWS account as the CA. If you revoke these permissions, - /// ACM will no longer renew the affected certificates automatically. + /// reside in the same Amazon Web Services account as the CA. If you revoke + /// these permissions, ACM will no longer renew the affected certificates + /// automatically. /// /// Permissions can be granted with the CreatePermission + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreatePermission.html">CreatePermission /// action and listed with the ListPermissions + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListPermissions.html">ListPermissions /// action. ///

    About Permissions /// @@ -412,8 +496,8 @@ class ACMPCA { /// then permissions cannot be used to enable automatic renewals. Instead, the /// ACM certificate owner must set up a resource-based policy to enable /// cross-account issuance and renewals. For more information, see Using - /// a Resource Based Policy with ACM Private CA. + /// href="https://docs.aws.amazon.com/privateca/latest/userguide/pca-rbp.html">Using + /// a Resource Based Policy with Amazon Web Services Private CA. /// /// /// @@ -425,19 +509,19 @@ class ACMPCA { /// Parameter [certificateAuthorityArn] : /// The Amazon Resource Number (ARN) of the private CA that issued the /// permissions. You can find the CA's ARN by calling the ListCertificateAuthorities + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities /// action. This must have the following form: /// /// arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 /// . /// /// Parameter [principal] : - /// The AWS service or identity that will have its CA permissions revoked. At - /// this time, the only valid service principal is + /// The Amazon Web Services service or identity that will have its CA + /// permissions revoked. At this time, the only valid service principal is /// acm.amazonaws.com /// /// Parameter [sourceAccount] : - /// The AWS account that calls this action. + /// The Amazon Web Services account that calls this action. Future deletePermission({ required String certificateAuthorityArn, required String principal, @@ -465,43 +549,44 @@ class ACMPCA { /// remove any access that the policy has granted. If there is no policy /// attached to the private CA, this action will return successful. /// - /// If you delete a policy that was applied through AWS Resource Access - /// Manager (RAM), the CA will be removed from all shares in which it was - /// included. + /// If you delete a policy that was applied through Amazon Web Services + /// Resource Access Manager (RAM), the CA will be removed from all shares in + /// which it was included. /// - /// The AWS Certificate Manager Service Linked Role that the policy supports - /// is not affected when you delete the policy. + /// The Certificate Manager Service Linked Role that the policy supports is + /// not affected when you delete the policy. /// /// The current policy can be shown with GetPolicy + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_GetPolicy.html">GetPolicy /// and updated with PutPolicy. + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_PutPolicy.html">PutPolicy. ///

    About Policies /// ///

    @@ -516,7 +601,7 @@ class ACMPCA { /// Parameter [resourceArn] : /// The Amazon Resource Number (ARN) of the private CA that will have its /// policy deleted. You can find the CA's ARN by calling the ListCertificateAuthorities + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities /// action. The ARN value must have the form /// arn:aws:acm-pca:region:account:certificate-authority/01234567-89ab-cdef-0123-0123456789ab. Future deletePolicy({ @@ -545,13 +630,14 @@ class ACMPCA { /// ///
      ///
    • - /// CREATING - ACM Private CA is creating your private - /// certificate authority. + /// CREATING - Amazon Web Services Private CA is creating your + /// private certificate authority. ///
    • ///
    • /// PENDING_CERTIFICATE - The certificate is pending. You must - /// use your ACM Private CA-hosted or on-premises root or subordinate CA to - /// sign your private CA CSR and then import it into PCA. + /// use your Amazon Web Services Private CA-hosted or on-premises root or + /// subordinate CA to sign your private CA CSR and then import it into Amazon + /// Web Services Private CA. ///
    • ///
    • /// ACTIVE - Your private CA is active. @@ -564,9 +650,9 @@ class ACMPCA { ///
    • ///
    • /// FAILED - Your private CA has failed. Your CA can fail because - /// of problems such a network outage or backend AWS failure or other errors. - /// A failed CA can never return to the pending state. You must create a new - /// CA. + /// of problems such a network outage or back-end Amazon Web Services failure + /// or other errors. A failed CA can never return to the pending state. You + /// must create a new CA. ///
    • ///
    • /// DELETED - Your private CA is within the restoration period, @@ -580,7 +666,7 @@ class ACMPCA { /// /// Parameter [certificateAuthorityArn] : /// The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority. /// This must be of the form: /// /// arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 @@ -607,12 +693,12 @@ class ACMPCA { } /// Lists information about a specific audit report created by calling the CreateCertificateAuthorityAuditReport + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthorityAuditReport.html">CreateCertificateAuthorityAuditReport /// action. Audit information is created every time the certificate authority /// (CA) private key is used. The private key is used when you call the IssueCertificate + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_IssueCertificate.html">IssueCertificate /// action or the RevokeCertificate + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_RevokeCertificate.html">RevokeCertificate /// action. /// /// May throw [ResourceNotFoundException]. @@ -621,7 +707,7 @@ class ACMPCA { /// /// Parameter [auditReportId] : /// The report ID returned by calling the CreateCertificateAuthorityAuditReport + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthorityAuditReport.html">CreateCertificateAuthorityAuditReport /// action. /// /// Parameter [certificateAuthorityArn] : @@ -657,12 +743,12 @@ class ACMPCA { /// Retrieves a certificate from your private CA or one that has been shared /// with you. The ARN of the certificate is returned when you call the IssueCertificate + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_IssueCertificate.html">IssueCertificate /// action. You must specify both the ARN of your private CA and the ARN of /// the issued certificate when calling the GetCertificate action. You /// can retrieve the certificate if it is in the ISSUED state. You can /// call the CreateCertificateAuthorityAuditReport + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthorityAuditReport.html">CreateCertificateAuthorityAuditReport /// action to create a report that contains information about all of the /// certificates issued and revoked by your private CA. /// @@ -681,7 +767,7 @@ class ACMPCA { /// /// Parameter [certificateAuthorityArn] : /// The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority. /// This must be of the form: /// /// arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 @@ -749,11 +835,11 @@ class ACMPCA { /// Retrieves the certificate signing request (CSR) for your private /// certificate authority (CA). The CSR is created when you call the CreateCertificateAuthority - /// action. Sign the CSR with your ACM Private CA-hosted or on-premises root - /// or subordinate CA. Then import the signed certificate back into ACM - /// Private CA by calling the ImportCertificateAuthorityCertificate + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority + /// action. Sign the CSR with your Amazon Web Services Private CA-hosted or + /// on-premises root or subordinate CA. Then import the signed certificate + /// back into Amazon Web Services Private CA by calling the ImportCertificateAuthorityCertificate /// action. The CSR is returned as a base64 PEM-encoded string. /// /// May throw [RequestInProgressException]. @@ -764,7 +850,7 @@ class ACMPCA { /// /// Parameter [certificateAuthorityArn] : /// The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority /// action. This must be of the form: /// /// arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 @@ -795,35 +881,36 @@ class ACMPCA { /// a ResourceNotFoundException. /// /// The policy can be attached or updated with PutPolicy + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_PutPolicy.html">PutPolicy /// and removed with DeletePolicy. + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_DeletePolicy.html">DeletePolicy. ///

      About Policies /// ///

      @@ -858,20 +945,20 @@ class ACMPCA { return GetPolicyResponse.fromJson(jsonResponse.body); } - /// Imports a signed private CA certificate into ACM Private CA. This action - /// is used when you are using a chain of trust whose root is located outside - /// ACM Private CA. Before you can call this action, the following - /// preparations must in place: + /// Imports a signed private CA certificate into Amazon Web Services Private + /// CA. This action is used when you are using a chain of trust whose root is + /// located outside Amazon Web Services Private CA. Before you can call this + /// action, the following preparations must in place: ///
        ///
      1. - /// In ACM Private CA, call the CreateCertificateAuthority - /// action to create the private CA that that you plan to back with the - /// imported certificate. + /// In Amazon Web Services Private CA, call the CreateCertificateAuthority + /// action to create the private CA that you plan to back with the imported + /// certificate. ///
      2. ///
      3. /// Call the GetCertificateAuthorityCsr + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_GetCertificateAuthorityCsr.html">GetCertificateAuthorityCsr /// action to generate a certificate signing request (CSR). ///
      4. ///
      5. @@ -882,22 +969,24 @@ class ACMPCA { /// Create a certificate chain and copy the signed certificate and the /// certificate chain to your working directory. ///
      - /// ACM Private CA supports three scenarios for installing a CA certificate: + /// Amazon Web Services Private CA supports three scenarios for installing a + /// CA certificate: /// ///
        ///
      • - /// Installing a certificate for a root CA hosted by ACM Private CA. + /// Installing a certificate for a root CA hosted by Amazon Web Services + /// Private CA. ///
      • ///
      • /// Installing a subordinate CA certificate whose parent authority is hosted - /// by ACM Private CA. + /// by Amazon Web Services Private CA. ///
      • ///
      • /// Installing a subordinate CA certificate whose parent authority is /// externally hosted. ///
      • ///
      - /// The following addtitional requirements apply when you import a CA + /// The following additional requirements apply when you import a CA /// certificate. /// ///
        @@ -929,8 +1018,8 @@ class ACMPCA { ///
      /// Enforcement of Critical Constraints /// - /// ACM Private CA allows the following extensions to be marked critical in - /// the imported CA certificate or chain. + /// Amazon Web Services Private CA allows the following extensions to be + /// marked critical in the imported CA certificate or chain. /// ///
        ///
      • @@ -970,8 +1059,8 @@ class ACMPCA { /// Inhibit anyPolicy ///
      • ///
      - /// ACM Private CA rejects the following extensions when they are marked - /// critical in an imported CA certificate or chain. + /// Amazon Web Services Private CA rejects the following extensions when they + /// are marked critical in an imported CA certificate or chain. /// ///
        ///
      • @@ -1011,7 +1100,7 @@ class ACMPCA { /// /// Parameter [certificateAuthorityArn] : /// The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority. /// This must be of the form: /// /// arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 @@ -1019,9 +1108,9 @@ class ACMPCA { /// /// Parameter [certificateChain] : /// A PEM-encoded file that contains all of your certificates, other than the - /// certificate you're importing, chaining up to your root CA. Your ACM - /// Private CA-hosted or on-premises root certificate is the last in the - /// chain, and each certificate in the chain signs the one preceding. + /// certificate you're importing, chaining up to your root CA. Your Amazon Web + /// Services Private CA-hosted or on-premises root certificate is the last in + /// the chain, and each certificate in the chain signs the one preceding. /// /// This parameter must be supplied when you import a subordinate CA. When you /// import a root CA, there is no chain. @@ -1053,12 +1142,12 @@ class ACMPCA { /// with you, to issue a client certificate. This action returns the Amazon /// Resource Name (ARN) of the certificate. You can retrieve the certificate /// by calling the GetCertificate + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_GetCertificate.html">GetCertificate /// action and specifying the ARN. /// /// You cannot use the ACM ListCertificateAuthorities action to - /// retrieve the ARNs of the certificates that you issue by using ACM Private - /// CA. + /// retrieve the ARNs of the certificates that you issue by using Amazon Web + /// Services Private CA. /// /// /// May throw [LimitExceededException]. @@ -1070,7 +1159,7 @@ class ACMPCA { /// /// Parameter [certificateAuthorityArn] : /// The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority. /// This must be of the form: /// /// arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 @@ -1078,18 +1167,18 @@ class ACMPCA { /// /// Parameter [csr] : /// The certificate signing request (CSR) for the certificate you want to - /// issue. You can use the following OpenSSL command to create the CSR and a - /// 2048 bit RSA private key. + /// issue. As an example, you can use the following OpenSSL command to create + /// the CSR and a 2048 bit RSA private key. /// /// openssl req -new -newkey rsa:2048 -days 365 -keyout /// private/test_cert_priv_key.pem -out csr/test_cert_.csr /// - /// If you have a configuration file, you can use the following OpenSSL + /// If you have a configuration file, you can then use the following OpenSSL /// command. The usr_cert block in the configuration file /// contains your X509 version 3 extensions. /// /// openssl req -new -config openssl_rsa.cnf -extensions usr_cert - /// -newkey rsa:2048 -days -365 -keyout private/test_cert_priv_key.pem -out + /// -newkey rsa:2048 -days 365 -keyout private/test_cert_priv_key.pem -out /// csr/test_cert_.csr /// /// Note: A CSR must provide either a subject name or a subject @@ -1100,100 +1189,104 @@ class ACMPCA { /// issued. /// /// This parameter should not be confused with the - /// SigningAlgorithm parameter used to sign a CSR. + /// SigningAlgorithm parameter used to sign a CSR in the + /// CreateCertificateAuthority action. + /// + /// The specified signing algorithm family (RSA or ECDSA) much match the + /// algorithm family of the CA's secret key. + /// /// /// Parameter [validity] : - /// Information describing the validity period of the certificate. - /// - /// When issuing a certificate, ACM Private CA sets the "Not Before" date in - /// the validity field to date and time minus 60 minutes. This is intended to - /// compensate for time inconsistencies across systems of 60 minutes or less. - /// - /// The validity period configured on a certificate must not exceed the limit - /// set by its parents in the CA hierarchy. + /// Information describing the end of the validity period of the certificate. + /// This parameter sets the “Not After” date for the certificate. + /// + /// Certificate validity is the period of time during which a certificate is + /// valid. Validity can be expressed as an explicit date and time when the + /// certificate expires, or as a span of time after issuance, stated in days, + /// months, or years. For more information, see Validity + /// in RFC 5280. + /// + /// This value is unaffected when ValidityNotBefore is also + /// specified. For example, if Validity is set to 20 days in the + /// future, the certificate will expire 20 days from issuance time regardless + /// of the ValidityNotBefore value. + /// + /// The end of the validity period configured on a certificate must not exceed + /// the limit set on its parents in the CA hierarchy. + /// + /// Parameter [apiPassthrough] : + /// Specifies X.509 certificate information to be included in the issued + /// certificate. An APIPassthrough or + /// APICSRPassthrough template variant must be selected, or else + /// this parameter is ignored. For more information about using these + /// templates, see Understanding + /// Certificate Templates. + /// + /// If conflicting or duplicate certificate information is supplied during + /// certificate issuance, Amazon Web Services Private CA applies order + /// of operation rules to determine what information is used. /// /// Parameter [idempotencyToken] : - /// Custom string that can be used to distinguish between calls to the - /// IssueCertificate action. Idempotency tokens time out after one - /// hour. Therefore, if you call IssueCertificate multiple times with - /// the same idempotency token within 5 minutes, ACM Private CA recognizes - /// that you are requesting only one certificate and will issue only one. If - /// you change the idempotency token for each call, PCA recognizes that you - /// are requesting multiple certificates. + /// Alphanumeric string that can be used to distinguish between calls to the + /// IssueCertificate action. Idempotency tokens for + /// IssueCertificate time out after one minute. Therefore, if you call + /// IssueCertificate multiple times with the same idempotency token + /// within one minute, Amazon Web Services Private CA recognizes that you are + /// requesting only one certificate and will issue only one. If you change the + /// idempotency token for each call, Amazon Web Services Private CA recognizes + /// that you are requesting multiple certificates. /// /// Parameter [templateArn] : /// Specifies a custom configuration template to use when issuing a - /// certificate. If this parameter is not provided, ACM Private CA defaults to - /// the EndEntityCertificate/V1 template. For CA certificates, - /// you should choose the shortest path length that meets your needs. The path - /// length is indicated by the PathLenN portion of the ARN, where - /// N is the CA + /// certificate. If this parameter is not provided, Amazon Web Services + /// Private CA defaults to the EndEntityCertificate/V1 template. + /// For CA certificates, you should choose the shortest path length that meets + /// your needs. The path length is indicated by the PathLenN portion of + /// the ARN, where N is the CA /// depth. /// /// Note: The CA depth configured on a subordinate CA certificate must not /// exceed the limit set by its parents in the CA hierarchy. /// - /// The following service-owned TemplateArn values are supported - /// by ACM Private CA: + /// For a list of TemplateArn values supported by Amazon Web + /// Services Private CA, see Understanding + /// Certificate Templates. /// - ///
          - ///
        • - /// arn:aws:acm-pca:::template/CodeSigningCertificate/V1 - ///
        • - ///
        • - /// arn:aws:acm-pca:::template/CodeSigningCertificate_CSRPassthrough/V1 - ///
        • - ///
        • - /// arn:aws:acm-pca:::template/EndEntityCertificate/V1 - ///
        • - ///
        • - /// arn:aws:acm-pca:::template/EndEntityCertificate_CSRPassthrough/V1 - ///
        • - ///
        • - /// arn:aws:acm-pca:::template/EndEntityClientAuthCertificate/V1 - ///
        • - ///
        • - /// arn:aws:acm-pca:::template/EndEntityClientAuthCertificate_CSRPassthrough/V1 - ///
        • - ///
        • - /// arn:aws:acm-pca:::template/EndEntityServerAuthCertificate/V1 - ///
        • - ///
        • - /// arn:aws:acm-pca:::template/EndEntityServerAuthCertificate_CSRPassthrough/V1 - ///
        • - ///
        • - /// arn:aws:acm-pca:::template/OCSPSigningCertificate/V1 - ///
        • - ///
        • - /// arn:aws:acm-pca:::template/OCSPSigningCertificate_CSRPassthrough/V1 - ///
        • - ///
        • - /// arn:aws:acm-pca:::template/RootCACertificate/V1 - ///
        • - ///
        • - /// arn:aws:acm-pca:::template/SubordinateCACertificate_PathLen0/V1 - ///
        • - ///
        • - /// arn:aws:acm-pca:::template/SubordinateCACertificate_PathLen1/V1 - ///
        • - ///
        • - /// arn:aws:acm-pca:::template/SubordinateCACertificate_PathLen2/V1 - ///
        • - ///
        • - /// arn:aws:acm-pca:::template/SubordinateCACertificate_PathLen3/V1 - ///
        • - ///
        - /// For more information, see Using - /// Templates. + /// Parameter [validityNotBefore] : + /// Information describing the start of the validity period of the + /// certificate. This parameter sets the “Not Before" date for the + /// certificate. + /// + /// By default, when issuing a certificate, Amazon Web Services Private CA + /// sets the "Not Before" date to the issuance time minus 60 minutes. This + /// compensates for clock inconsistencies across computer systems. The + /// ValidityNotBefore parameter can be used to customize the “Not + /// Before” value. + /// + /// Unlike the Validity parameter, the + /// ValidityNotBefore parameter is optional. + /// + /// The ValidityNotBefore value is expressed as an explicit date + /// and time, using the Validity type value + /// ABSOLUTE. For more information, see Validity + /// in this API reference and Validity + /// in RFC 5280. Future issueCertificate({ required String certificateAuthorityArn, required Uint8List csr, required SigningAlgorithm signingAlgorithm, required Validity validity, + ApiPassthrough? apiPassthrough, String? idempotencyToken, String? templateArn, + Validity? validityNotBefore, }) async { final headers = { 'Content-Type': 'application/x-amz-json-1.1', @@ -1210,8 +1303,10 @@ class ACMPCA { 'Csr': base64Encode(csr), 'SigningAlgorithm': signingAlgorithm.toValue(), 'Validity': validity, + if (apiPassthrough != null) 'ApiPassthrough': apiPassthrough, if (idempotencyToken != null) 'IdempotencyToken': idempotencyToken, if (templateArn != null) 'TemplateArn': templateArn, + if (validityNotBefore != null) 'ValidityNotBefore': validityNotBefore, }, ); @@ -1219,7 +1314,7 @@ class ACMPCA { } /// Lists the private certificate authorities that you created by using the CreateCertificateAuthority + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority /// action. /// /// May throw [InvalidNextTokenException]. @@ -1270,16 +1365,16 @@ class ACMPCA { return ListCertificateAuthoritiesResponse.fromJson(jsonResponse.body); } - /// List all permissions on a private CA, if any, granted to the AWS - /// Certificate Manager (ACM) service principal (acm.amazonaws.com). + /// List all permissions on a private CA, if any, granted to the Certificate + /// Manager (ACM) service principal (acm.amazonaws.com). /// /// These permissions allow ACM to issue and renew ACM certificates that - /// reside in the same AWS account as the CA. + /// reside in the same Amazon Web Services account as the CA. /// /// Permissions can be granted with the CreatePermission + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreatePermission.html">CreatePermission /// action and revoked with the DeletePermission + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_DeletePermission.html">DeletePermission /// action. ///

        About Permissions /// @@ -1298,8 +1393,8 @@ class ACMPCA { /// then permissions cannot be used to enable automatic renewals. Instead, the /// ACM certificate owner must set up a resource-based policy to enable /// cross-account issuance and renewals. For more information, see Using - /// a Resource Based Policy with ACM Private CA. + /// href="https://docs.aws.amazon.com/privateca/latest/userguide/pca-rbp.html">Using + /// a Resource Based Policy with Amazon Web Services Private CA. ///

      • ///
      /// @@ -1312,11 +1407,11 @@ class ACMPCA { /// Parameter [certificateAuthorityArn] : /// The Amazon Resource Number (ARN) of the private CA to inspect. You can /// find the ARN by calling the ListCertificateAuthorities + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities /// action. This must be of the form: /// arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 /// You can get a private CA's ARN by running the ListCertificateAuthorities + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities /// action. /// /// Parameter [maxResults] : @@ -1365,9 +1460,9 @@ class ACMPCA { /// that has been shared with you. Tags are labels that you can use to /// identify and organize your CAs. Each tag consists of a key and an optional /// value. Call the TagCertificateAuthority + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_TagCertificateAuthority.html">TagCertificateAuthority /// action to add one or more tags to your CA. Call the UntagCertificateAuthority + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_UntagCertificateAuthority.html">UntagCertificateAuthority /// action to remove tags. /// /// May throw [ResourceNotFoundException]. @@ -1376,7 +1471,7 @@ class ACMPCA { /// /// Parameter [certificateAuthorityArn] : /// The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority /// action. This must be of the form: /// /// arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 @@ -1426,41 +1521,42 @@ class ACMPCA { /// Attaches a resource-based policy to a private CA. /// - /// A policy can also be applied by sharing a private CA through AWS Resource - /// Access Manager (RAM). For more information, see Attach + /// A policy can also be applied by sharing a private CA through Amazon Web + /// Services Resource Access Manager (RAM). For more information, see Attach /// a Policy for Cross-Account Access. /// /// The policy can be displayed with GetPolicy + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_GetPolicy.html">GetPolicy /// and removed with DeletePolicy. + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_DeletePolicy.html">DeletePolicy. ///

      About Policies /// ///

      @@ -1474,7 +1570,7 @@ class ACMPCA { /// May throw [ResourceNotFoundException]. /// /// Parameter [policy] : - /// The path and filename of a JSON-formatted IAM policy to attach to the + /// The path and file name of a JSON-formatted IAM policy to attach to the /// specified private CA resource. If this policy does not contain all /// required statements or if it includes any statement that is not allowed, /// the PutPolicy action returns an @@ -1486,7 +1582,7 @@ class ACMPCA { /// Parameter [resourceArn] : /// The Amazon Resource Number (ARN) of the private CA to associate with the /// policy. The ARN of the CA can be found by calling the ListCertificateAuthorities + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities /// action. ///

      Future putPolicy({ @@ -1513,22 +1609,22 @@ class ACMPCA { /// Restores a certificate authority (CA) that is in the DELETED /// state. You can restore a CA during the period that you defined in the /// PermanentDeletionTimeInDays parameter of the DeleteCertificateAuthority + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_DeleteCertificateAuthority.html">DeleteCertificateAuthority /// action. Currently, you can specify 7 to 30 days. If you did not specify a /// PermanentDeletionTimeInDays value, by default you can restore the /// CA at any time in a 30 day period. You can check the time remaining in the /// restoration period of a private CA in the DELETED state by /// calling the DescribeCertificateAuthority + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_DescribeCertificateAuthority.html">DescribeCertificateAuthority /// or ListCertificateAuthorities + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities /// actions. The status of a restored CA is set to its pre-deletion status /// when the RestoreCertificateAuthority action returns. To change its /// status to ACTIVE, call the UpdateCertificateAuthority + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_UpdateCertificateAuthority.html">UpdateCertificateAuthority /// action. If the private CA was in the PENDING_CERTIFICATE /// state at deletion, you must use the ImportCertificateAuthorityCertificate + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ImportCertificateAuthorityCertificate.html">ImportCertificateAuthorityCertificate /// action to import a certificate authority into the private CA before it can /// be activated. You cannot restore a CA after the restoration period has /// ended. @@ -1539,7 +1635,7 @@ class ACMPCA { /// /// Parameter [certificateAuthorityArn] : /// The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority /// action. This must be of the form: /// /// arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 @@ -1563,28 +1659,29 @@ class ACMPCA { ); } - /// Revokes a certificate that was issued inside ACM Private CA. If you enable - /// a certificate revocation list (CRL) when you create or update your private - /// CA, information about the revoked certificates will be included in the - /// CRL. ACM Private CA writes the CRL to an S3 bucket that you specify. A CRL - /// is typically updated approximately 30 minutes after a certificate is - /// revoked. If for any reason the CRL update fails, ACM Private CA attempts - /// makes further attempts every 15 minutes. With Amazon CloudWatch, you can - /// create alarms for the metrics CRLGenerated and - /// MisconfiguredCRLBucket. For more information, see Supported + /// Revokes a certificate that was issued inside Amazon Web Services Private + /// CA. If you enable a certificate revocation list (CRL) when you create or + /// update your private CA, information about the revoked certificates will be + /// included in the CRL. Amazon Web Services Private CA writes the CRL to an + /// S3 bucket that you specify. A CRL is typically updated approximately 30 + /// minutes after a certificate is revoked. If for any reason the CRL update + /// fails, Amazon Web Services Private CA attempts makes further attempts + /// every 15 minutes. With Amazon CloudWatch, you can create alarms for the + /// metrics CRLGenerated and MisconfiguredCRLBucket. + /// For more information, see Supported /// CloudWatch Metrics. /// - /// Both PCA and the IAM principal must have permission to write to the S3 - /// bucket that you specify. If the IAM principal making the call does not - /// have permission to write to the bucket, then an exception is thrown. For - /// more information, see Configure - /// Access to ACM Private CA. + /// Both Amazon Web Services Private CA and the IAM principal must have + /// permission to write to the S3 bucket that you specify. If the IAM + /// principal making the call does not have permission to write to the bucket, + /// then an exception is thrown. For more information, see Access + /// policies for CRLs in Amazon S3. /// - /// ACM Private CA also writes revocation information to the audit report. For - /// more information, see CreateCertificateAuthorityAuditReport. + /// Amazon Web Services Private CA also writes revocation information to the + /// audit report. For more information, see CreateCertificateAuthorityAuditReport. /// /// You cannot revoke a root CA self-signed certificate. /// @@ -1609,7 +1706,7 @@ class ACMPCA { /// Parameter [certificateSerial] : /// Serial number of the certificate to be revoked. This must be in /// hexadecimal format. You can retrieve the serial number by calling GetCertificate + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_GetCertificate.html">GetCertificate /// with the Amazon Resource Name (ARN) of the certificate you want and the /// ARN of your private CA. The GetCertificate action retrieves the /// certificate in the PEM format. You can use the following OpenSSL command @@ -1620,7 +1717,7 @@ class ACMPCA { /// /// You can also copy the serial number from the console or use the DescribeCertificate - /// action in the AWS Certificate Manager API Reference. + /// action in the Certificate Manager API Reference. /// /// Parameter [revocationReason] : /// Specifies why you revoked the certificate. @@ -1648,17 +1745,25 @@ class ACMPCA { } /// Adds one or more tags to your private CA. Tags are labels that you can use - /// to identify and organize your AWS resources. Each tag consists of a key - /// and an optional value. You specify the private CA on input by its Amazon - /// Resource Name (ARN). You specify the tag by using a key-value pair. You - /// can apply a tag to just one private CA if you want to identify a specific - /// characteristic of that CA, or you can apply the same tag to multiple - /// private CAs if you want to filter for a common relationship among those - /// CAs. To remove one or more tags, use the UntagCertificateAuthority + /// to identify and organize your Amazon Web Services resources. Each tag + /// consists of a key and an optional value. You specify the private CA on + /// input by its Amazon Resource Name (ARN). You specify the tag by using a + /// key-value pair. You can apply a tag to just one private CA if you want to + /// identify a specific characteristic of that CA, or you can apply the same + /// tag to multiple private CAs if you want to filter for a common + /// relationship among those CAs. To remove one or more tags, use the UntagCertificateAuthority /// action. Call the ListTags + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListTags.html">ListTags /// action to see what tags are associated with your CA. + /// + /// To attach tags to a private CA during the creation procedure, a CA + /// administrator must first associate an inline IAM policy with the + /// CreateCertificateAuthority action and explicitly allow + /// tagging. For more information, see Attaching + /// tags to a CA at the time of creation. + /// /// /// May throw [ResourceNotFoundException]. /// May throw [InvalidArnException]. @@ -1668,7 +1773,7 @@ class ACMPCA { /// /// Parameter [certificateAuthorityArn] : /// The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority. /// This must be of the form: /// /// arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 @@ -1702,9 +1807,9 @@ class ACMPCA { /// calling this action, the tag will be removed regardless of value. If you /// specify a value, the tag is removed only if it is associated with the /// specified value. To add tags to a private CA, use the TagCertificateAuthority. + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_TagCertificateAuthority.html">TagCertificateAuthority. /// Call the ListTags + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListTags.html">ListTags /// action to see what tags are associated with your CA. /// /// May throw [ResourceNotFoundException]. @@ -1714,7 +1819,7 @@ class ACMPCA { /// /// Parameter [certificateAuthorityArn] : /// The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority. /// This must be of the form: /// /// arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 @@ -1749,12 +1854,12 @@ class ACMPCA { /// private CA that is in the ACTIVE state or make a CA that is /// in the DISABLED state active again. /// - /// Both PCA and the IAM principal must have permission to write to the S3 - /// bucket that you specify. If the IAM principal making the call does not - /// have permission to write to the bucket, then an exception is thrown. For - /// more information, see Configure - /// Access to ACM Private CA. + /// Both Amazon Web Services Private CA and the IAM principal must have + /// permission to write to the S3 bucket that you specify. If the IAM + /// principal making the call does not have permission to write to the bucket, + /// then an exception is thrown. For more information, see Access + /// policies for CRLs in Amazon S3. /// /// /// May throw [ConcurrentModificationException]. @@ -1772,7 +1877,41 @@ class ACMPCA { /// /// /// Parameter [revocationConfiguration] : - /// Revocation information for your private CA. + /// Contains information to enable Online Certificate Status Protocol (OCSP) + /// support, to enable a certificate revocation list (CRL), to enable both, or + /// to enable neither. If this parameter is not supplied, existing capibilites + /// remain unchanged. For more information, see the OcspConfiguration + /// and CrlConfiguration + /// types. + /// + /// The following requirements apply to revocation configurations. + /// + ///

        + ///
      • + /// A configuration disabling CRLs or OCSP must contain only the + /// Enabled=False parameter, and will fail if other parameters + /// such as CustomCname or ExpirationInDays are + /// included. + ///
      • + ///
      • + /// In a CRL configuration, the S3BucketName parameter must + /// conform to Amazon + /// S3 bucket naming rules. + ///
      • + ///
      • + /// A configuration containing a custom Canonical Name (CNAME) parameter for + /// CRLs or OCSP must conform to RFC2396 restrictions on + /// the use of special characters in a CNAME. + ///
      • + ///
      • + /// In a CRL or OCSP configuration, the value of a CNAME parameter must not + /// include a protocol prefix such as "http://" or "https://". + ///
      • + ///
      /// /// Parameter [status] : /// Status of your private CA. @@ -1801,16 +1940,12 @@ class ACMPCA { } } -/// Contains information about the certificate subject. The certificate can be -/// one issued by your private certificate authority (CA) or it can be your -/// private CA certificate. The Subject field in the certificate -/// identifies the entity that owns or controls the public key in the -/// certificate. The entity can be a user, computer, device, or service. The -/// Subject must contain an X.500 distinguished name (DN). A DN is a -/// sequence of relative distinguished names (RDNs). The RDNs are separated by -/// commas in the certificate. The DN must be unique for each entity, but your -/// private CA can issue more than one certificate with the same DN to the same -/// entity. +/// Contains information about the certificate subject. The Subject +/// field in the certificate identifies the entity that owns or controls the +/// public key in the certificate. The entity can be a user, computer, device, +/// or service. The Subject must contain an X.500 distinguished +/// name (DN). A DN is a sequence of relative distinguished names (RDNs). The +/// RDNs are separated by commas in the certificate. class ASN1Subject { /// For CA and end-entity certificates in a private PKI, the common name (CN) /// can be any string within the length limit. @@ -1823,6 +1958,17 @@ class ASN1Subject { /// located. final String? country; + ///

      + /// Contains a sequence of one or more X.500 relative distinguished names + /// (RDNs), each of which consists of an object identifier (OID) and a value. + /// For more information, see NIST’s definition of Object + /// Identifier (OID). + /// + /// Custom attributes cannot be used in combination with standard attributes. + /// + final List? customAttributes; + /// Disambiguating information for the certificate subject. final String? distinguishedNameQualifier; @@ -1835,7 +1981,7 @@ class ASN1Subject { /// Concatenation that typically contains the first letter of the /// GivenName, the first letter of the middle name if one exists, and the - /// first letter of the SurName. + /// first letter of the Surname. final String? initials; /// The locality (such as a city or town) in which the certificate subject is @@ -1872,6 +2018,7 @@ class ASN1Subject { ASN1Subject({ this.commonName, this.country, + this.customAttributes, this.distinguishedNameQualifier, this.generationQualifier, this.givenName, @@ -1885,10 +2032,15 @@ class ASN1Subject { this.surname, this.title, }); + factory ASN1Subject.fromJson(Map json) { return ASN1Subject( commonName: json['CommonName'] as String?, country: json['Country'] as String?, + customAttributes: (json['CustomAttributes'] as List?) + ?.whereNotNull() + .map((e) => CustomAttribute.fromJson(e as Map)) + .toList(), distinguishedNameQualifier: json['DistinguishedNameQualifier'] as String?, generationQualifier: json['GenerationQualifier'] as String?, givenName: json['GivenName'] as String?, @@ -1907,6 +2059,7 @@ class ASN1Subject { Map toJson() { final commonName = this.commonName; final country = this.country; + final customAttributes = this.customAttributes; final distinguishedNameQualifier = this.distinguishedNameQualifier; final generationQualifier = this.generationQualifier; final givenName = this.givenName; @@ -1922,6 +2075,7 @@ class ASN1Subject { return { if (commonName != null) 'CommonName': commonName, if (country != null) 'Country': country, + if (customAttributes != null) 'CustomAttributes': customAttributes, if (distinguishedNameQualifier != null) 'DistinguishedNameQualifier': distinguishedNameQualifier, if (generationQualifier != null) @@ -1942,7 +2096,7 @@ class ASN1Subject { /// Provides access information used by the authorityInfoAccess and /// subjectInfoAccess extensions described in RFC 5280. +/// href="https://datatracker.ietf.org/doc/html/rfc5280">RFC 5280. class AccessDescription { /// The location of AccessDescription information. final GeneralName accessLocation; @@ -1954,6 +2108,7 @@ class AccessDescription { required this.accessLocation, required this.accessMethod, }); + factory AccessDescription.fromJson(Map json) { return AccessDescription( accessLocation: @@ -1991,6 +2146,7 @@ class AccessMethod { this.accessMethodType, this.customObjectIdentifier, }); + factory AccessMethod.fromJson(Map json) { return AccessMethod( accessMethodType: @@ -2077,6 +2233,34 @@ extension ActionTypeFromString on String { } } +/// Contains X.509 certificate information to be placed in an issued +/// certificate. An APIPassthrough or +/// APICSRPassthrough template variant must be selected, or else +/// this parameter is ignored. +/// +/// If conflicting or duplicate certificate information is supplied from other +/// sources, Amazon Web Services Private CA applies order +/// of operation rules to determine what information is used. +class ApiPassthrough { + /// Specifies X.509 extension information for a certificate. + final Extensions? extensions; + final ASN1Subject? subject; + + ApiPassthrough({ + this.extensions, + this.subject, + }); + Map toJson() { + final extensions = this.extensions; + final subject = this.subject; + return { + if (extensions != null) 'Extensions': extensions, + if (subject != null) 'Subject': subject, + }; + } +} + enum AuditReportResponseFormat { json, csv, @@ -2143,14 +2327,14 @@ extension AuditReportStatusFromString on String { /// certificates verify that the entity named in the certificate Subject /// field owns or controls the public key contained in the Subject Public Key /// Info field. Call the CreateCertificateAuthority +/// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority /// action to create your private CA. You must then call the GetCertificateAuthorityCertificate +/// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_GetCertificateAuthorityCertificate.html">GetCertificateAuthorityCertificate /// action to retrieve a private CA certificate signing request (CSR). Sign the -/// CSR with your ACM Private CA-hosted or on-premises root or subordinate CA -/// certificate. Call the ImportCertificateAuthorityCertificate -/// action to import the signed certificate into AWS Certificate Manager (ACM). +/// CSR with your Amazon Web Services Private CA-hosted or on-premises root or +/// subordinate CA certificate. Call the ImportCertificateAuthorityCertificate +/// action to import the signed certificate into Certificate Manager (ACM). class CertificateAuthority { /// Amazon Resource Name (ARN) for your private certificate authority (CA). The /// format is 12345678-1234-1234-1234-123456789012 . @@ -2165,6 +2349,19 @@ class CertificateAuthority { /// Reason the request to create your private CA failed. final FailureReason? failureReason; + /// Defines a cryptographic key management compliance standard used for handling + /// CA keys. + /// + /// Default: FIPS_140_2_LEVEL_3_OR_HIGHER + /// + /// Note: Amazon Web Services Region ap-northeast-3 supports only + /// FIPS_140_2_LEVEL_2_OR_HIGHER. You must explicitly specify this parameter and + /// value when creating a CA in that Region. Specifying a different value (or no + /// value) results in an InvalidArgsException with the message "A + /// certificate authority cannot be created in this region with the specified + /// security standard." + final KeyStorageSecurityStandard? keyStorageSecurityStandard; + /// Date and time at which your private CA was last updated. final DateTime? lastStateChangeAt; @@ -2174,17 +2371,18 @@ class CertificateAuthority { /// Date and time before which your private CA certificate is not valid. final DateTime? notBefore; - /// The AWS account ID that owns the certificate authority. + /// The Amazon Web Services account ID that owns the certificate authority. final String? ownerAccount; /// The period during which a deleted CA can be restored. For more information, /// see the PermanentDeletionTimeInDays parameter of the DeleteCertificateAuthorityRequest + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_DeleteCertificateAuthorityRequest.html">DeleteCertificateAuthorityRequest /// action. final DateTime? restorableUntil; - /// Information about the certificate revocation list (CRL) created and - /// maintained by your private CA. + /// Information about the Online Certificate Status Protocol (OCSP) + /// configuration or certificate revocation list (CRL) created and maintained by + /// your private CA. final RevocationConfiguration? revocationConfiguration; /// Serial number of your private CA. @@ -2196,11 +2394,20 @@ class CertificateAuthority { /// Type of your private CA. final CertificateAuthorityType? type; + /// Specifies whether the CA issues general-purpose certificates that typically + /// require a revocation mechanism, or short-lived certificates that may + /// optionally omit revocation because they expire quickly. Short-lived + /// certificate validity is limited to seven days. + /// + /// The default value is GENERAL_PURPOSE. + final CertificateAuthorityUsageMode? usageMode; + CertificateAuthority({ this.arn, this.certificateAuthorityConfiguration, this.createdAt, this.failureReason, + this.keyStorageSecurityStandard, this.lastStateChangeAt, this.notAfter, this.notBefore, @@ -2210,7 +2417,9 @@ class CertificateAuthority { this.serial, this.status, this.type, + this.usageMode, }); + factory CertificateAuthority.fromJson(Map json) { return CertificateAuthority( arn: json['Arn'] as String?, @@ -2222,6 +2431,9 @@ class CertificateAuthority { : null, createdAt: timeStampFromJson(json['CreatedAt']), failureReason: (json['FailureReason'] as String?)?.toFailureReason(), + keyStorageSecurityStandard: + (json['KeyStorageSecurityStandard'] as String?) + ?.toKeyStorageSecurityStandard(), lastStateChangeAt: timeStampFromJson(json['LastStateChangeAt']), notAfter: timeStampFromJson(json['NotAfter']), notBefore: timeStampFromJson(json['NotBefore']), @@ -2234,6 +2446,8 @@ class CertificateAuthority { serial: json['Serial'] as String?, status: (json['Status'] as String?)?.toCertificateAuthorityStatus(), type: (json['Type'] as String?)?.toCertificateAuthorityType(), + usageMode: + (json['UsageMode'] as String?)?.toCertificateAuthorityUsageMode(), ); } } @@ -2244,7 +2458,7 @@ class CertificateAuthority { /// also includes the signature algorithm that it uses when issuing /// certificates, and its X.500 distinguished name. You must specify this /// information when you call the CreateCertificateAuthority +/// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority /// action. class CertificateAuthorityConfiguration { /// Type of the public key algorithm and size, in bits, of the key pair that @@ -2272,6 +2486,7 @@ class CertificateAuthorityConfiguration { required this.subject, this.csrExtensions, }); + factory CertificateAuthorityConfiguration.fromJson( Map json) { return CertificateAuthorityConfiguration( @@ -2382,6 +2597,35 @@ extension CertificateAuthorityTypeFromString on String { } } +enum CertificateAuthorityUsageMode { + generalPurpose, + shortLivedCertificate, +} + +extension CertificateAuthorityUsageModeValueExtension + on CertificateAuthorityUsageMode { + String toValue() { + switch (this) { + case CertificateAuthorityUsageMode.generalPurpose: + return 'GENERAL_PURPOSE'; + case CertificateAuthorityUsageMode.shortLivedCertificate: + return 'SHORT_LIVED_CERTIFICATE'; + } + } +} + +extension CertificateAuthorityUsageModeFromString on String { + CertificateAuthorityUsageMode toCertificateAuthorityUsageMode() { + switch (this) { + case 'GENERAL_PURPOSE': + return CertificateAuthorityUsageMode.generalPurpose; + case 'SHORT_LIVED_CERTIFICATE': + return CertificateAuthorityUsageMode.shortLivedCertificate; + } + throw Exception('$this is not known in enum CertificateAuthorityUsageMode'); + } +} + class CreateCertificateAuthorityAuditReportResponse { /// An alphanumeric string that contains a report identifier. final String? auditReportId; @@ -2393,6 +2637,7 @@ class CreateCertificateAuthorityAuditReportResponse { this.auditReportId, this.s3Key, }); + factory CreateCertificateAuthorityAuditReportResponse.fromJson( Map json) { return CreateCertificateAuthorityAuditReportResponse( @@ -2413,6 +2658,7 @@ class CreateCertificateAuthorityResponse { CreateCertificateAuthorityResponse({ this.certificateAuthorityArn, }); + factory CreateCertificateAuthorityResponse.fromJson( Map json) { return CreateCertificateAuthorityResponse( @@ -2430,19 +2676,23 @@ class CreateCertificateAuthorityResponse { /// the CustomCname parameter. Your private CA copies the CNAME or the S3 /// bucket name to the CRL Distribution Points extension of each /// certificate it issues. Your S3 bucket policy must give write permission to -/// ACM Private CA. +/// Amazon Web Services Private CA. /// -/// ACM Private CAA assets that are stored in Amazon S3 can be protected with -/// encryption. For more information, see Encrypting +/// Amazon Web Services Private CA assets that are stored in Amazon S3 can be +/// protected with encryption. For more information, see Encrypting /// Your CRLs. /// /// Your private CA uses the value in the ExpirationInDays parameter to -/// calculate the nextUpdate field in the CRL. The CRL is refreshed at -/// 1/2 the age of next update or when a certificate is revoked. When a -/// certificate is revoked, it is recorded in the next CRL that is generated and -/// in the next audit report. Only time valid certificates are listed in the -/// CRL. Expired certificates are not included. +/// calculate the nextUpdate field in the CRL. The CRL is refreshed prior +/// to a certificate's expiration date or when a certificate is revoked. When a +/// certificate is revoked, it appears in the CRL until the certificate expires, +/// and then in one additional CRL after expiration, and it always appears in +/// the audit report. +/// +/// A CRL is typically updated approximately 30 minutes after a certificate is +/// revoked. If for any reason a CRL update fails, Amazon Web Services Private +/// CA makes further attempts every 15 minutes. /// /// CRLs contain the following fields: /// @@ -2505,23 +2755,34 @@ class CreateCertificateAuthorityResponse { /// Signature Value: Signature computed over the CRL. ///

    • ///
    -/// Certificate revocation lists created by ACM Private CA are DER-encoded. You -/// can use the following OpenSSL command to list a CRL. +/// Certificate revocation lists created by Amazon Web Services Private CA are +/// DER-encoded. You can use the following OpenSSL command to list a CRL. /// /// openssl crl -inform DER -text -in crl_path -noout +/// +/// For more information, see Planning +/// a certificate revocation list (CRL) in the Amazon Web Services +/// Private Certificate Authority User Guide class CrlConfiguration { /// Boolean value that specifies whether certificate revocation lists (CRLs) are /// enabled. You can use this value to enable certificate revocation for a new /// CA when you call the CreateCertificateAuthority + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority /// action or for an existing CA when you call the UpdateCertificateAuthority + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_UpdateCertificateAuthority.html">UpdateCertificateAuthority /// action. final bool enabled; /// Name inserted into the certificate CRL Distribution Points extension /// that enables the use of an alias for the CRL distribution point. Use this /// value if you don't want the name of your S3 bucket to be public. + /// + /// The content of a Canonical Name (CNAME) record must conform to RFC2396 restrictions on the + /// use of special characters in URIs. Additionally, the value of the CNAME must + /// not include a protocol prefix such as "http://" or "https://". + /// final String? customCname; /// Validity period of the CRL in days. @@ -2531,23 +2792,54 @@ class CrlConfiguration { /// for the CustomCname argument, the name of your S3 bucket is placed /// into the CRL Distribution Points extension of the issued certificate. /// You can change the name of your bucket by calling the UpdateCertificateAuthority - /// action. You must specify a bucket policy that allows ACM Private CA to write - /// the CRL to your bucket. + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_UpdateCertificateAuthority.html">UpdateCertificateAuthority + /// operation. You must specify a bucket + /// policy that allows Amazon Web Services Private CA to write the CRL to + /// your bucket. + /// + /// The S3BucketName parameter must conform to the S3 + /// bucket naming rules. + /// final String? s3BucketName; + /// Determines whether the CRL will be publicly readable or privately held in + /// the CRL Amazon S3 bucket. If you choose PUBLIC_READ, the CRL will be + /// accessible over the public internet. If you choose + /// BUCKET_OWNER_FULL_CONTROL, only the owner of the CRL S3 bucket can access + /// the CRL, and your PKI clients may need an alternative method of access. + /// + /// If no value is specified, the default is PUBLIC_READ. + /// + /// Note: This default can cause CA creation to fail in some + /// circumstances. If you have have enabled the Block Public Access (BPA) + /// feature in your S3 account, then you must specify the value of this + /// parameter as BUCKET_OWNER_FULL_CONTROL, and not doing so + /// results in an error. If you have disabled BPA in S3, then you can specify + /// either BUCKET_OWNER_FULL_CONTROL or PUBLIC_READ as + /// the value. + /// + /// For more information, see Blocking + /// public access to the S3 bucket. + final S3ObjectAcl? s3ObjectAcl; + CrlConfiguration({ required this.enabled, this.customCname, this.expirationInDays, this.s3BucketName, + this.s3ObjectAcl, }); + factory CrlConfiguration.fromJson(Map json) { return CrlConfiguration( enabled: json['Enabled'] as bool, customCname: json['CustomCname'] as String?, expirationInDays: json['ExpirationInDays'] as int?, s3BucketName: json['S3BucketName'] as String?, + s3ObjectAcl: (json['S3ObjectAcl'] as String?)?.toS3ObjectAcl(), ); } @@ -2556,11 +2848,13 @@ class CrlConfiguration { final customCname = this.customCname; final expirationInDays = this.expirationInDays; final s3BucketName = this.s3BucketName; + final s3ObjectAcl = this.s3ObjectAcl; return { 'Enabled': enabled, if (customCname != null) 'CustomCname': customCname, if (expirationInDays != null) 'ExpirationInDays': expirationInDays, if (s3BucketName != null) 'S3BucketName': s3BucketName, + if (s3ObjectAcl != null) 'S3ObjectAcl': s3ObjectAcl.toValue(), }; } } @@ -2574,7 +2868,7 @@ class CsrExtensions { /// For CA certificates, provides a path to additional information pertaining to /// the CA, such as revocation and policy. For more information, see Subject + /// href="https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.2.2">Subject /// Information Access in RFC 5280. final List? subjectInformationAccess; @@ -2582,6 +2876,7 @@ class CsrExtensions { this.keyUsage, this.subjectInformationAccess, }); + factory CsrExtensions.fromJson(Map json) { return CsrExtensions( keyUsage: json['KeyUsage'] != null @@ -2605,6 +2900,77 @@ class CsrExtensions { } } +/// Defines the X.500 relative distinguished name (RDN). +class CustomAttribute { + /// Specifies the object identifier (OID) of the attribute type of the relative + /// distinguished name (RDN). + final String objectIdentifier; + + ///

    + /// Specifies the attribute value of relative distinguished name (RDN). + final String value; + + CustomAttribute({ + required this.objectIdentifier, + required this.value, + }); + + factory CustomAttribute.fromJson(Map json) { + return CustomAttribute( + objectIdentifier: json['ObjectIdentifier'] as String, + value: json['Value'] as String, + ); + } + + Map toJson() { + final objectIdentifier = this.objectIdentifier; + final value = this.value; + return { + 'ObjectIdentifier': objectIdentifier, + 'Value': value, + }; + } +} + +///

    +/// Specifies the X.509 extension information for a certificate. +/// +/// Extensions present in CustomExtensions follow the +/// ApiPassthrough template +/// rules. +class CustomExtension { + ///

    + /// Specifies the object identifier (OID) of the X.509 extension. For more + /// information, see the Global OID + /// reference database. + final String objectIdentifier; + + ///

    + /// Specifies the base64-encoded value of the X.509 extension. + final String value; + + ///

    + /// Specifies the critical flag of the X.509 extension. + final bool? critical; + + CustomExtension({ + required this.objectIdentifier, + required this.value, + this.critical, + }); + Map toJson() { + final objectIdentifier = this.objectIdentifier; + final value = this.value; + final critical = this.critical; + return { + 'ObjectIdentifier': objectIdentifier, + 'Value': value, + if (critical != null) 'Critical': critical, + }; + } +} + class DescribeCertificateAuthorityAuditReportResponse { /// Specifies whether report creation is in progress, has succeeded, or has /// failed. @@ -2625,6 +2991,7 @@ class DescribeCertificateAuthorityAuditReportResponse { this.s3BucketName, this.s3Key, }); + factory DescribeCertificateAuthorityAuditReportResponse.fromJson( Map json) { return DescribeCertificateAuthorityAuditReportResponse( @@ -2639,13 +3006,14 @@ class DescribeCertificateAuthorityAuditReportResponse { class DescribeCertificateAuthorityResponse { /// A CertificateAuthority + /// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CertificateAuthority.html">CertificateAuthority /// structure that contains information about your private CA. final CertificateAuthority? certificateAuthority; DescribeCertificateAuthorityResponse({ this.certificateAuthority, }); + factory DescribeCertificateAuthorityResponse.fromJson( Map json) { return DescribeCertificateAuthorityResponse( @@ -2658,8 +3026,8 @@ class DescribeCertificateAuthorityResponse { } /// Describes an Electronic Data Interchange (EDI) entity as described in as -/// defined in Subject Alternative -/// Name in RFC 5280. +/// defined in Subject +/// Alternative Name in RFC 5280. class EdiPartyName { /// Specifies the party name. final String partyName; @@ -2671,6 +3039,7 @@ class EdiPartyName { required this.partyName, this.nameAssigner, }); + factory EdiPartyName.fromJson(Map json) { return EdiPartyName( partyName: json['PartyName'] as String, @@ -2688,6 +3057,154 @@ class EdiPartyName { } } +/// Specifies additional purposes for which the certified public key may be used +/// other than basic purposes indicated in the KeyUsage extension. +class ExtendedKeyUsage { + /// Specifies a custom ExtendedKeyUsage with an object identifier + /// (OID). + final String? extendedKeyUsageObjectIdentifier; + + /// Specifies a standard ExtendedKeyUsage as defined as in RFC + /// 5280. + final ExtendedKeyUsageType? extendedKeyUsageType; + + ExtendedKeyUsage({ + this.extendedKeyUsageObjectIdentifier, + this.extendedKeyUsageType, + }); + Map toJson() { + final extendedKeyUsageObjectIdentifier = + this.extendedKeyUsageObjectIdentifier; + final extendedKeyUsageType = this.extendedKeyUsageType; + return { + if (extendedKeyUsageObjectIdentifier != null) + 'ExtendedKeyUsageObjectIdentifier': extendedKeyUsageObjectIdentifier, + if (extendedKeyUsageType != null) + 'ExtendedKeyUsageType': extendedKeyUsageType.toValue(), + }; + } +} + +enum ExtendedKeyUsageType { + serverAuth, + clientAuth, + codeSigning, + emailProtection, + timeStamping, + ocspSigning, + smartCardLogin, + documentSigning, + certificateTransparency, +} + +extension ExtendedKeyUsageTypeValueExtension on ExtendedKeyUsageType { + String toValue() { + switch (this) { + case ExtendedKeyUsageType.serverAuth: + return 'SERVER_AUTH'; + case ExtendedKeyUsageType.clientAuth: + return 'CLIENT_AUTH'; + case ExtendedKeyUsageType.codeSigning: + return 'CODE_SIGNING'; + case ExtendedKeyUsageType.emailProtection: + return 'EMAIL_PROTECTION'; + case ExtendedKeyUsageType.timeStamping: + return 'TIME_STAMPING'; + case ExtendedKeyUsageType.ocspSigning: + return 'OCSP_SIGNING'; + case ExtendedKeyUsageType.smartCardLogin: + return 'SMART_CARD_LOGIN'; + case ExtendedKeyUsageType.documentSigning: + return 'DOCUMENT_SIGNING'; + case ExtendedKeyUsageType.certificateTransparency: + return 'CERTIFICATE_TRANSPARENCY'; + } + } +} + +extension ExtendedKeyUsageTypeFromString on String { + ExtendedKeyUsageType toExtendedKeyUsageType() { + switch (this) { + case 'SERVER_AUTH': + return ExtendedKeyUsageType.serverAuth; + case 'CLIENT_AUTH': + return ExtendedKeyUsageType.clientAuth; + case 'CODE_SIGNING': + return ExtendedKeyUsageType.codeSigning; + case 'EMAIL_PROTECTION': + return ExtendedKeyUsageType.emailProtection; + case 'TIME_STAMPING': + return ExtendedKeyUsageType.timeStamping; + case 'OCSP_SIGNING': + return ExtendedKeyUsageType.ocspSigning; + case 'SMART_CARD_LOGIN': + return ExtendedKeyUsageType.smartCardLogin; + case 'DOCUMENT_SIGNING': + return ExtendedKeyUsageType.documentSigning; + case 'CERTIFICATE_TRANSPARENCY': + return ExtendedKeyUsageType.certificateTransparency; + } + throw Exception('$this is not known in enum ExtendedKeyUsageType'); + } +} + +/// Contains X.509 extension information for a certificate. +class Extensions { + /// Contains a sequence of one or more policy information terms, each of which + /// consists of an object identifier (OID) and optional qualifiers. For more + /// information, see NIST's definition of Object + /// Identifier (OID). + /// + /// In an end-entity certificate, these terms indicate the policy under which + /// the certificate was issued and the purposes for which it may be used. In a + /// CA certificate, these terms limit the set of policies for certification + /// paths that include this certificate. + final List? certificatePolicies; + + ///

    + /// Contains a sequence of one or more X.509 extensions, each of which consists + /// of an object identifier (OID), a base64-encoded value, and the critical + /// flag. For more information, see the Global OID reference database. + final List? customExtensions; + + /// Specifies additional purposes for which the certified public key may be used + /// other than basic purposes indicated in the KeyUsage extension. + final List? extendedKeyUsage; + final KeyUsage? keyUsage; + + /// The subject alternative name extension allows identities to be bound to the + /// subject of the certificate. These identities may be included in addition to + /// or in place of the identity in the subject field of the certificate. + final List? subjectAlternativeNames; + + Extensions({ + this.certificatePolicies, + this.customExtensions, + this.extendedKeyUsage, + this.keyUsage, + this.subjectAlternativeNames, + }); + Map toJson() { + final certificatePolicies = this.certificatePolicies; + final customExtensions = this.customExtensions; + final extendedKeyUsage = this.extendedKeyUsage; + final keyUsage = this.keyUsage; + final subjectAlternativeNames = this.subjectAlternativeNames; + return { + if (certificatePolicies != null) + 'CertificatePolicies': certificatePolicies, + if (customExtensions != null) 'CustomExtensions': customExtensions, + if (extendedKeyUsage != null) 'ExtendedKeyUsage': extendedKeyUsage, + if (keyUsage != null) 'KeyUsage': keyUsage, + if (subjectAlternativeNames != null) + 'SubjectAlternativeNames': subjectAlternativeNames, + }; + } +} + enum FailureReason { requestTimedOut, unsupportedAlgorithm, @@ -2722,9 +3239,9 @@ extension FailureReasonFromString on String { } /// Describes an ASN.1 X.400 GeneralName as defined in RFC 5280. Only one of the -/// following naming options should be providied. Providing more than one option -/// results in an InvalidArgsException error. +/// href="https://datatracker.ietf.org/doc/html/rfc5280">RFC 5280. Only one +/// of the following naming options should be provided. Providing more than one +/// option results in an InvalidArgsException error. class GeneralName { final ASN1Subject? directoryName; @@ -2744,7 +3261,8 @@ class GeneralName { final String? registeredId; /// Represents GeneralName as an RFC 822 email address. + /// href="https://datatracker.ietf.org/doc/html/rfc822">RFC 822 email + /// address. final String? rfc822Name; /// Represents GeneralName as a URI. @@ -2760,6 +3278,7 @@ class GeneralName { this.rfc822Name, this.uniformResourceIdentifier, }); + factory GeneralName.fromJson(Map json) { return GeneralName( directoryName: json['DirectoryName'] != null @@ -2816,6 +3335,7 @@ class GetCertificateAuthorityCertificateResponse { this.certificate, this.certificateChain, }); + factory GetCertificateAuthorityCertificateResponse.fromJson( Map json) { return GetCertificateAuthorityCertificateResponse( @@ -2833,6 +3353,7 @@ class GetCertificateAuthorityCsrResponse { GetCertificateAuthorityCsrResponse({ this.csr, }); + factory GetCertificateAuthorityCsrResponse.fromJson( Map json) { return GetCertificateAuthorityCsrResponse( @@ -2854,6 +3375,7 @@ class GetCertificateResponse { this.certificate, this.certificateChain, }); + factory GetCertificateResponse.fromJson(Map json) { return GetCertificateResponse( certificate: json['Certificate'] as String?, @@ -2869,6 +3391,7 @@ class GetPolicyResponse { GetPolicyResponse({ this.policy, }); + factory GetPolicyResponse.fromJson(Map json) { return GetPolicyResponse( policy: json['Policy'] as String?, @@ -2887,6 +3410,7 @@ class IssueCertificateResponse { IssueCertificateResponse({ this.certificateArn, }); + factory IssueCertificateResponse.fromJson(Map json) { return IssueCertificateResponse( certificateArn: json['CertificateArn'] as String?, @@ -2932,6 +3456,35 @@ extension KeyAlgorithmFromString on String { } } +enum KeyStorageSecurityStandard { + fips_140_2Level_2OrHigher, + fips_140_2Level_3OrHigher, +} + +extension KeyStorageSecurityStandardValueExtension + on KeyStorageSecurityStandard { + String toValue() { + switch (this) { + case KeyStorageSecurityStandard.fips_140_2Level_2OrHigher: + return 'FIPS_140_2_LEVEL_2_OR_HIGHER'; + case KeyStorageSecurityStandard.fips_140_2Level_3OrHigher: + return 'FIPS_140_2_LEVEL_3_OR_HIGHER'; + } + } +} + +extension KeyStorageSecurityStandardFromString on String { + KeyStorageSecurityStandard toKeyStorageSecurityStandard() { + switch (this) { + case 'FIPS_140_2_LEVEL_2_OR_HIGHER': + return KeyStorageSecurityStandard.fips_140_2Level_2OrHigher; + case 'FIPS_140_2_LEVEL_3_OR_HIGHER': + return KeyStorageSecurityStandard.fips_140_2Level_3OrHigher; + } + throw Exception('$this is not known in enum KeyStorageSecurityStandard'); + } +} + /// Defines one or more purposes for which the key contained in the certificate /// can be used. Default value for each option is false. class KeyUsage { @@ -2973,6 +3526,7 @@ class KeyUsage { this.keyEncipherment, this.nonRepudiation, }); + factory KeyUsage.fromJson(Map json) { return KeyUsage( cRLSign: json['CRLSign'] as bool?, @@ -3023,6 +3577,7 @@ class ListCertificateAuthoritiesResponse { this.certificateAuthorities, this.nextToken, }); + factory ListCertificateAuthoritiesResponse.fromJson( Map json) { return ListCertificateAuthoritiesResponse( @@ -3049,6 +3604,7 @@ class ListPermissionsResponse { this.nextToken, this.permissions, }); + factory ListPermissionsResponse.fromJson(Map json) { return ListPermissionsResponse( nextToken: json['NextToken'] as String?, @@ -3072,6 +3628,7 @@ class ListTagsResponse { this.nextToken, this.tags, }); + factory ListTagsResponse.fromJson(Map json) { return ListTagsResponse( nextToken: json['NextToken'] as String?, @@ -3083,6 +3640,54 @@ class ListTagsResponse { } } +/// Contains information to enable and configure Online Certificate Status +/// Protocol (OCSP) for validating certificate revocation status. +/// +/// When you revoke a certificate, OCSP responses may take up to 60 minutes to +/// reflect the new status. +class OcspConfiguration { + /// Flag enabling use of the Online Certificate Status Protocol (OCSP) for + /// validating certificate revocation status. + final bool enabled; + + /// By default, Amazon Web Services Private CA injects an Amazon Web Services + /// domain into certificates being validated by the Online Certificate Status + /// Protocol (OCSP). A customer can alternatively use this object to define a + /// CNAME specifying a customized OCSP domain. + /// + /// The content of a Canonical Name (CNAME) record must conform to RFC2396 restrictions on the + /// use of special characters in URIs. Additionally, the value of the CNAME must + /// not include a protocol prefix such as "http://" or "https://". + /// + /// For more information, see Customizing + /// Online Certificate Status Protocol (OCSP) in the Amazon Web Services + /// Private Certificate Authority User Guide. + final String? ocspCustomCname; + + OcspConfiguration({ + required this.enabled, + this.ocspCustomCname, + }); + + factory OcspConfiguration.fromJson(Map json) { + return OcspConfiguration( + enabled: json['Enabled'] as bool, + ocspCustomCname: json['OcspCustomCname'] as String?, + ); + } + + Map toJson() { + final enabled = this.enabled; + final ocspCustomCname = this.ocspCustomCname; + return { + 'Enabled': enabled, + if (ocspCustomCname != null) 'OcspCustomCname': ocspCustomCname, + }; + } +} + /// Defines a custom ASN.1 X.400 GeneralName using an object /// identifier (OID) and value. The OID must satisfy the regular expression /// shown below. For more information, see NIST's definition of json) { return OtherName( typeId: json['TypeId'] as String, @@ -3116,19 +3722,20 @@ class OtherName { } } -/// Permissions designate which private CA actions can be performed by an AWS -/// service or entity. In order for ACM to automatically renew private -/// certificates, you must give the ACM service principal all available +/// Permissions designate which private CA actions can be performed by an Amazon +/// Web Services service or entity. In order for ACM to automatically renew +/// private certificates, you must give the ACM service principal all available /// permissions (IssueCertificate, GetCertificate, and /// ListPermissions). Permissions can be assigned with the CreatePermission +/// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreatePermission.html">CreatePermission /// action, removed with the DeletePermission +/// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_DeletePermission.html">DeletePermission /// action, and listed with the ListPermissions +/// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListPermissions.html">ListPermissions /// action. class Permission { - /// The private CA actions that can be performed by the designated AWS service. + /// The private CA actions that can be performed by the designated Amazon Web + /// Services service. final List? actions; /// The Amazon Resource Number (ARN) of the private CA from which the permission @@ -3141,8 +3748,8 @@ class Permission { /// The name of the policy that is associated with the permission. final String? policy; - /// The AWS service or entity that holds the permission. At this time, the only - /// valid principal is acm.amazonaws.com. + /// The Amazon Web Services service or entity that holds the permission. At this + /// time, the only valid principal is acm.amazonaws.com. final String? principal; /// The ID of the account that assigned the permission. @@ -3156,6 +3763,7 @@ class Permission { this.principal, this.sourceAccount, }); + factory Permission.fromJson(Map json) { return Permission( actions: (json['Actions'] as List?) @@ -3171,6 +3779,101 @@ class Permission { } } +/// Defines the X.509 CertificatePolicies extension. +class PolicyInformation { + /// Specifies the object identifier (OID) of the certificate policy under which + /// the certificate was issued. For more information, see NIST's definition of + /// Object + /// Identifier (OID). + final String certPolicyId; + + /// Modifies the given CertPolicyId with a qualifier. Amazon Web + /// Services Private CA supports the certification practice statement (CPS) + /// qualifier. + final List? policyQualifiers; + + PolicyInformation({ + required this.certPolicyId, + this.policyQualifiers, + }); + Map toJson() { + final certPolicyId = this.certPolicyId; + final policyQualifiers = this.policyQualifiers; + return { + 'CertPolicyId': certPolicyId, + if (policyQualifiers != null) 'PolicyQualifiers': policyQualifiers, + }; + } +} + +enum PolicyQualifierId { + cps, +} + +extension PolicyQualifierIdValueExtension on PolicyQualifierId { + String toValue() { + switch (this) { + case PolicyQualifierId.cps: + return 'CPS'; + } + } +} + +extension PolicyQualifierIdFromString on String { + PolicyQualifierId toPolicyQualifierId() { + switch (this) { + case 'CPS': + return PolicyQualifierId.cps; + } + throw Exception('$this is not known in enum PolicyQualifierId'); + } +} + +/// Modifies the CertPolicyId of a PolicyInformation +/// object with a qualifier. Amazon Web Services Private CA supports the +/// certification practice statement (CPS) qualifier. +class PolicyQualifierInfo { + /// Identifies the qualifier modifying a CertPolicyId. + final PolicyQualifierId policyQualifierId; + + /// Defines the qualifier type. Amazon Web Services Private CA supports the use + /// of a URI for a CPS qualifier in this field. + final Qualifier qualifier; + + PolicyQualifierInfo({ + required this.policyQualifierId, + required this.qualifier, + }); + Map toJson() { + final policyQualifierId = this.policyQualifierId; + final qualifier = this.qualifier; + return { + 'PolicyQualifierId': policyQualifierId.toValue(), + 'Qualifier': qualifier, + }; + } +} + +/// Defines a PolicyInformation qualifier. Amazon Web Services +/// Private CA supports the certification +/// practice statement (CPS) qualifier defined in RFC 5280. +class Qualifier { + /// Contains a pointer to a certification practice statement (CPS) published by + /// the CA. + final String cpsUri; + + Qualifier({ + required this.cpsUri, + }); + Map toJson() { + final cpsUri = this.cpsUri; + return { + 'CpsUri': cpsUri, + }; + } +} + enum ResourceOwner { self, otherAccounts, @@ -3200,34 +3903,55 @@ extension ResourceOwnerFromString on String { } /// Certificate revocation information used by the CreateCertificateAuthority +/// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority /// and UpdateCertificateAuthority -/// actions. Your private certificate authority (CA) can create and maintain a -/// certificate revocation list (CRL). A CRL contains information about +/// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_UpdateCertificateAuthority.html">UpdateCertificateAuthority +/// actions. Your private certificate authority (CA) can configure Online +/// Certificate Status Protocol (OCSP) support and/or maintain a certificate +/// revocation list (CRL). OCSP returns validation information about +/// certificates as requested by clients, and a CRL contains an updated list of /// certificates revoked by your CA. For more information, see RevokeCertificate. +/// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_RevokeCertificate.html">RevokeCertificate +/// and Setting +/// up a certificate revocation method in the Amazon Web Services Private +/// Certificate Authority User Guide. class RevocationConfiguration { /// Configuration of the certificate revocation list (CRL), if any, maintained - /// by your private CA. + /// by your private CA. A CRL is typically updated approximately 30 minutes + /// after a certificate is revoked. If for any reason a CRL update fails, Amazon + /// Web Services Private CA makes further attempts every 15 minutes. final CrlConfiguration? crlConfiguration; + /// Configuration of Online Certificate Status Protocol (OCSP) support, if any, + /// maintained by your private CA. When you revoke a certificate, OCSP responses + /// may take up to 60 minutes to reflect the new status. + final OcspConfiguration? ocspConfiguration; + RevocationConfiguration({ this.crlConfiguration, + this.ocspConfiguration, }); + factory RevocationConfiguration.fromJson(Map json) { return RevocationConfiguration( crlConfiguration: json['CrlConfiguration'] != null ? CrlConfiguration.fromJson( json['CrlConfiguration'] as Map) : null, + ocspConfiguration: json['OcspConfiguration'] != null + ? OcspConfiguration.fromJson( + json['OcspConfiguration'] as Map) + : null, ); } Map toJson() { final crlConfiguration = this.crlConfiguration; + final ocspConfiguration = this.ocspConfiguration; return { if (crlConfiguration != null) 'CrlConfiguration': crlConfiguration, + if (ocspConfiguration != null) 'OcspConfiguration': ocspConfiguration, }; } } @@ -3290,6 +4014,34 @@ extension RevocationReasonFromString on String { } } +enum S3ObjectAcl { + publicRead, + bucketOwnerFullControl, +} + +extension S3ObjectAclValueExtension on S3ObjectAcl { + String toValue() { + switch (this) { + case S3ObjectAcl.publicRead: + return 'PUBLIC_READ'; + case S3ObjectAcl.bucketOwnerFullControl: + return 'BUCKET_OWNER_FULL_CONTROL'; + } + } +} + +extension S3ObjectAclFromString on String { + S3ObjectAcl toS3ObjectAcl() { + switch (this) { + case 'PUBLIC_READ': + return S3ObjectAcl.publicRead; + case 'BUCKET_OWNER_FULL_CONTROL': + return S3ObjectAcl.bucketOwnerFullControl; + } + throw Exception('$this is not known in enum S3ObjectAcl'); + } +} + enum SigningAlgorithm { sha256withecdsa, sha384withecdsa, @@ -3341,9 +4093,9 @@ extension SigningAlgorithmFromString on String { /// Tags are labels that you can use to identify and organize your private CAs. /// Each tag consists of a key and an optional value. You can associate up to 50 /// tags with a private CA. To add one or more tags to a private CA, call the TagCertificateAuthority +/// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_TagCertificateAuthority.html">TagCertificateAuthority /// action. To remove a tag, call the UntagCertificateAuthority +/// href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_UntagCertificateAuthority.html">UntagCertificateAuthority /// action. class Tag { /// Key (name) of the tag. @@ -3356,6 +4108,7 @@ class Tag { required this.key, this.value, }); + factory Tag.fromJson(Map json) { return Tag( key: json['Key'] as String, @@ -3374,20 +4127,24 @@ class Tag { } /// Validity specifies the period of time during which a certificate is valid. -/// Validity can be expressed as an explicit date and time when the certificate -/// expires, or as a span of time after issuance, stated in days, months, or -/// years. For more information, see Validity in /// RFC 5280. /// -/// You can issue a certificate by calling the IssueCertificate -/// action. +/// Amazon Web Services Private CA API consumes the Validity data +/// type differently in two distinct parameters of the +/// IssueCertificate action. The required parameter +/// IssueCertificate:Validity specifies the end of a +/// certificate's validity period. The optional parameter +/// IssueCertificate:ValidityNotBefore specifies a +/// customized starting time for the validity period. class Validity { - /// Determines how ACM Private CA interprets the Value - /// parameter, an integer. Supported validity types include those listed below. - /// Type definitions with values include a sample input value and the resulting - /// output. + /// Determines how Amazon Web Services Private CA interprets the + /// Value parameter, an integer. Supported validity types include + /// those listed below. Type definitions with values include a sample input + /// value and the resulting output. /// /// END_DATE: The specific date and time when the certificate will /// expire, expressed using UTCTime (YYMMDDHHMMSS) or GeneralizedTime @@ -3403,8 +4160,8 @@ class Validity { /// Output expiration date/time: 12/31/2049 23:59:59 /// /// - /// ABSOLUTE: The specific date and time when the certificate will - /// expire, expressed in seconds since the Unix Epoch. + /// ABSOLUTE: The specific date and time when the validity of a + /// certificate will start or expire, expressed in seconds since the Unix Epoch. /// ///

      ///
    • diff --git a/generated/aws_alexaforbusiness_api/lib/alexaforbusiness-2017-11-09.dart b/generated/aws_alexaforbusiness_api/lib/alexaforbusiness-2017-11-09.dart index 80832f71a..96642f85b 100644 --- a/generated/aws_alexaforbusiness_api/lib/alexaforbusiness-2017-11-09.dart +++ b/generated/aws_alexaforbusiness_api/lib/alexaforbusiness-2017-11-09.dart @@ -286,10 +286,15 @@ class AlexaForBusiness { /// /// Parameter [description] : /// The description of the address book. + /// + /// Parameter [tags] : + /// The tags to be added to the specified resource. Do not provide system + /// tags. Future createAddressBook({ required String name, String? clientRequestToken, String? description, + List? tags, }) async { final headers = { 'Content-Type': 'application/x-amz-json-1.1', @@ -306,6 +311,7 @@ class AlexaForBusiness { 'ClientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(), if (description != null) 'Description': description, + if (tags != null) 'Tags': tags, }, ); @@ -401,6 +407,10 @@ class AlexaForBusiness { /// /// Parameter [pSTNDialIn] : /// The information for PSTN conferencing. + /// + /// Parameter [tags] : + /// The tags to be added to the specified resource. Do not provide system + /// tags. Future createConferenceProvider({ required String conferenceProviderName, required ConferenceProviderType conferenceProviderType, @@ -408,6 +418,7 @@ class AlexaForBusiness { String? clientRequestToken, IPDialIn? iPDialIn, PSTNDialIn? pSTNDialIn, + List? tags, }) async { final headers = { 'Content-Type': 'application/x-amz-json-1.1', @@ -427,6 +438,7 @@ class AlexaForBusiness { clientRequestToken ?? _s.generateIdempotencyToken(), if (iPDialIn != null) 'IPDialIn': iPDialIn, if (pSTNDialIn != null) 'PSTNDialIn': pSTNDialIn, + if (tags != null) 'Tags': tags, }, ); @@ -464,6 +476,10 @@ class AlexaForBusiness { /// /// Parameter [sipAddresses] : /// The list of SIP addresses for the contact. + /// + /// Parameter [tags] : + /// The tags to be added to the specified resource. Do not provide system + /// tags. Future createContact({ required String firstName, String? clientRequestToken, @@ -472,6 +488,7 @@ class AlexaForBusiness { String? phoneNumber, List? phoneNumbers, List? sipAddresses, + List? tags, }) async { final headers = { 'Content-Type': 'application/x-amz-json-1.1', @@ -492,6 +509,7 @@ class AlexaForBusiness { if (phoneNumber != null) 'PhoneNumber': phoneNumber, if (phoneNumbers != null) 'PhoneNumbers': phoneNumbers, if (sipAddresses != null) 'SipAddresses': sipAddresses, + if (tags != null) 'Tags': tags, }, ); @@ -512,10 +530,15 @@ class AlexaForBusiness { /// /// Parameter [description] : /// The description of the gateway group. + /// + /// Parameter [tags] : + /// The tags to be added to the specified resource. Do not provide system + /// tags. Future createGatewayGroup({ required String name, String? clientRequestToken, String? description, + List? tags, }) async { final headers = { 'Content-Type': 'application/x-amz-json-1.1', @@ -532,6 +555,7 @@ class AlexaForBusiness { 'ClientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(), if (description != null) 'Description': description, + if (tags != null) 'Tags': tags, }, ); @@ -576,6 +600,10 @@ class AlexaForBusiness { /// asynchronously transmitted to the device and is used when the password of /// the network changes to NextPassword. /// + /// Parameter [tags] : + /// The tags to be added to the specified resource. Do not provide system + /// tags. + /// /// Parameter [trustAnchors] : /// The root certificates of your authentication server that is installed on /// your devices and used to trust your authentication server during EAP @@ -590,6 +618,7 @@ class AlexaForBusiness { String? description, NetworkEapMethod? eapMethod, String? nextPassword, + List? tags, List? trustAnchors, }) async { final headers = { @@ -614,6 +643,7 @@ class AlexaForBusiness { if (description != null) 'Description': description, if (eapMethod != null) 'EapMethod': eapMethod.toValue(), if (nextPassword != null) 'NextPassword': nextPassword, + if (tags != null) 'Tags': tags, if (trustAnchors != null) 'TrustAnchors': trustAnchors, }, ); @@ -648,6 +678,9 @@ class AlexaForBusiness { /// Parameter [clientRequestToken] : /// The user-specified token that is used during the creation of a profile. /// + /// Parameter [dataRetentionOptIn] : + /// Whether data retention of the profile is enabled. + /// /// Parameter [locale] : /// The locale of the room profile. (This is currently only available to a /// limited preview audience.) @@ -674,6 +707,7 @@ class AlexaForBusiness { required String timezone, required WakeWord wakeWord, String? clientRequestToken, + bool? dataRetentionOptIn, String? locale, int? maxVolumeLimit, CreateMeetingRoomConfiguration? meetingRoomConfiguration, @@ -700,6 +734,8 @@ class AlexaForBusiness { 'WakeWord': wakeWord.toValue(), 'ClientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(), + if (dataRetentionOptIn != null) + 'DataRetentionOptIn': dataRetentionOptIn, if (locale != null) 'Locale': locale, if (maxVolumeLimit != null) 'MaxVolumeLimit': maxVolumeLimit, if (meetingRoomConfiguration != null) @@ -2406,7 +2442,12 @@ class AlexaForBusiness { /// of your AVS device. /// /// Parameter [roomArn] : - /// The ARN of the room with which to associate your AVS device. + /// The Amazon Resource Name (ARN) of the room with which to associate your + /// AVS device. + /// + /// Parameter [tags] : + /// The tags to be added to the specified resource. Do not provide system + /// tags. Future registerAVSDevice({ required String amazonId, required String clientId, @@ -2414,6 +2455,7 @@ class AlexaForBusiness { required String userCode, String? deviceSerialNumber, String? roomArn, + List? tags, }) async { final headers = { 'Content-Type': 'application/x-amz-json-1.1', @@ -2433,6 +2475,7 @@ class AlexaForBusiness { if (deviceSerialNumber != null) 'DeviceSerialNumber': deviceSerialNumber, if (roomArn != null) 'RoomArn': roomArn, + if (tags != null) 'Tags': tags, }, ); @@ -2471,6 +2514,13 @@ class AlexaForBusiness { /// Determines the details for the room from which a skill request was /// invoked. This operation is used by skill developers. /// + /// To query ResolveRoom from an Alexa skill, the skill ID needs to be + /// authorized. When the skill is using an AWS Lambda function, the skill is + /// automatically authorized when you publish your skill as a private skill to + /// your AWS account. Skills that are hosted using a custom web service must + /// be manually authorized. To get your skill authorized, contact AWS Support + /// with your AWS account ID that queries the ResolveRoom API and skill ID. + /// /// May throw [NotFoundException]. /// /// Parameter [skillId] : @@ -3584,6 +3634,9 @@ class AlexaForBusiness { /// Parameter [address] : /// The updated address for the room profile. /// + /// Parameter [dataRetentionOptIn] : + /// Whether data retention of the profile is enabled. + /// /// Parameter [distanceUnit] : /// The updated distance unit for the room profile. /// @@ -3623,6 +3676,7 @@ class AlexaForBusiness { /// The updated wake word for the room profile. Future updateProfile({ String? address, + bool? dataRetentionOptIn, DistanceUnit? distanceUnit, bool? isDefault, String? locale, @@ -3648,6 +3702,8 @@ class AlexaForBusiness { headers: headers, payload: { if (address != null) 'Address': address, + if (dataRetentionOptIn != null) + 'DataRetentionOptIn': dataRetentionOptIn, if (distanceUnit != null) 'DistanceUnit': distanceUnit.toValue(), if (isDefault != null) 'IsDefault': isDefault, if (locale != null) 'Locale': locale, @@ -3767,6 +3823,7 @@ class AddressBook { this.description, this.name, }); + factory AddressBook.fromJson(Map json) { return AddressBook( addressBookArn: json['AddressBookArn'] as String?, @@ -3792,6 +3849,7 @@ class AddressBookData { this.description, this.name, }); + factory AddressBookData.fromJson(Map json) { return AddressBookData( addressBookArn: json['AddressBookArn'] as String?, @@ -3803,6 +3861,7 @@ class AddressBookData { class ApproveSkillResponse { ApproveSkillResponse(); + factory ApproveSkillResponse.fromJson(Map _) { return ApproveSkillResponse(); } @@ -3810,6 +3869,7 @@ class ApproveSkillResponse { class AssociateContactWithAddressBookResponse { AssociateContactWithAddressBookResponse(); + factory AssociateContactWithAddressBookResponse.fromJson( Map _) { return AssociateContactWithAddressBookResponse(); @@ -3818,6 +3878,7 @@ class AssociateContactWithAddressBookResponse { class AssociateDeviceWithNetworkProfileResponse { AssociateDeviceWithNetworkProfileResponse(); + factory AssociateDeviceWithNetworkProfileResponse.fromJson( Map _) { return AssociateDeviceWithNetworkProfileResponse(); @@ -3826,6 +3887,7 @@ class AssociateDeviceWithNetworkProfileResponse { class AssociateDeviceWithRoomResponse { AssociateDeviceWithRoomResponse(); + factory AssociateDeviceWithRoomResponse.fromJson(Map _) { return AssociateDeviceWithRoomResponse(); } @@ -3833,6 +3895,7 @@ class AssociateDeviceWithRoomResponse { class AssociateSkillGroupWithRoomResponse { AssociateSkillGroupWithRoomResponse(); + factory AssociateSkillGroupWithRoomResponse.fromJson(Map _) { return AssociateSkillGroupWithRoomResponse(); } @@ -3840,6 +3903,7 @@ class AssociateSkillGroupWithRoomResponse { class AssociateSkillWithSkillGroupResponse { AssociateSkillWithSkillGroupResponse(); + factory AssociateSkillWithSkillGroupResponse.fromJson( Map _) { return AssociateSkillWithSkillGroupResponse(); @@ -3848,6 +3912,7 @@ class AssociateSkillWithSkillGroupResponse { class AssociateSkillWithUsersResponse { AssociateSkillWithUsersResponse(); + factory AssociateSkillWithUsersResponse.fromJson(Map _) { return AssociateSkillWithUsersResponse(); } @@ -3915,6 +3980,7 @@ class BusinessReport { this.s3Location, this.status, }); + factory BusinessReport.fromJson(Map json) { return BusinessReport( deliveryTime: timeStampFromJson(json['DeliveryTime']), @@ -3938,6 +4004,7 @@ class BusinessReportContentRange { BusinessReportContentRange({ required this.interval, }); + factory BusinessReportContentRange.fromJson(Map json) { return BusinessReportContentRange( interval: (json['Interval'] as String).toBusinessReportInterval(), @@ -4054,6 +4121,7 @@ class BusinessReportRecurrence { BusinessReportRecurrence({ this.startDate, }); + factory BusinessReportRecurrence.fromJson(Map json) { return BusinessReportRecurrence( startDate: json['StartDate'] as String?, @@ -4080,6 +4148,7 @@ class BusinessReportS3Location { this.bucketName, this.path, }); + factory BusinessReportS3Location.fromJson(Map json) { return BusinessReportS3Location( bucketName: json['BucketName'] as String?, @@ -4126,6 +4195,7 @@ class BusinessReportSchedule { this.scheduleArn, this.scheduleName, }); + factory BusinessReportSchedule.fromJson(Map json) { return BusinessReportSchedule( contentRange: json['ContentRange'] != null @@ -4195,6 +4265,7 @@ class Category { this.categoryId, this.categoryName, }); + factory Category.fromJson(Map json) { return Category( categoryId: json['CategoryId'] as int?, @@ -4245,6 +4316,7 @@ class ConferencePreference { ConferencePreference({ this.defaultConferenceProviderArn, }); + factory ConferencePreference.fromJson(Map json) { return ConferencePreference( defaultConferenceProviderArn: @@ -4292,6 +4364,7 @@ class ConferenceProvider { this.pSTNDialIn, this.type, }); + factory ConferenceProvider.fromJson(Map json) { return ConferenceProvider( arn: json['Arn'] as String?, @@ -4442,6 +4515,7 @@ class Contact { this.phoneNumbers, this.sipAddresses, }); + factory Contact.fromJson(Map json) { return Contact( contactArn: json['ContactArn'] as String?, @@ -4496,6 +4570,7 @@ class ContactData { this.phoneNumbers, this.sipAddresses, }); + factory ContactData.fromJson(Map json) { return ContactData( contactArn: json['ContactArn'] as String?, @@ -4551,6 +4626,7 @@ class CreateAddressBookResponse { CreateAddressBookResponse({ this.addressBookArn, }); + factory CreateAddressBookResponse.fromJson(Map json) { return CreateAddressBookResponse( addressBookArn: json['AddressBookArn'] as String?, @@ -4565,6 +4641,7 @@ class CreateBusinessReportScheduleResponse { CreateBusinessReportScheduleResponse({ this.scheduleArn, }); + factory CreateBusinessReportScheduleResponse.fromJson( Map json) { return CreateBusinessReportScheduleResponse( @@ -4580,6 +4657,7 @@ class CreateConferenceProviderResponse { CreateConferenceProviderResponse({ this.conferenceProviderArn, }); + factory CreateConferenceProviderResponse.fromJson(Map json) { return CreateConferenceProviderResponse( conferenceProviderArn: json['ConferenceProviderArn'] as String?, @@ -4594,6 +4672,7 @@ class CreateContactResponse { CreateContactResponse({ this.contactArn, }); + factory CreateContactResponse.fromJson(Map json) { return CreateContactResponse( contactArn: json['ContactArn'] as String?, @@ -4638,6 +4717,7 @@ class CreateGatewayGroupResponse { CreateGatewayGroupResponse({ this.gatewayGroupArn, }); + factory CreateGatewayGroupResponse.fromJson(Map json) { return CreateGatewayGroupResponse( gatewayGroupArn: json['GatewayGroupArn'] as String?, @@ -4716,6 +4796,7 @@ class CreateNetworkProfileResponse { CreateNetworkProfileResponse({ this.networkProfileArn, }); + factory CreateNetworkProfileResponse.fromJson(Map json) { return CreateNetworkProfileResponse( networkProfileArn: json['NetworkProfileArn'] as String?, @@ -4730,6 +4811,7 @@ class CreateProfileResponse { CreateProfileResponse({ this.profileArn, }); + factory CreateProfileResponse.fromJson(Map json) { return CreateProfileResponse( profileArn: json['ProfileArn'] as String?, @@ -4769,6 +4851,7 @@ class CreateRoomResponse { CreateRoomResponse({ this.roomArn, }); + factory CreateRoomResponse.fromJson(Map json) { return CreateRoomResponse( roomArn: json['RoomArn'] as String?, @@ -4783,6 +4866,7 @@ class CreateSkillGroupResponse { CreateSkillGroupResponse({ this.skillGroupArn, }); + factory CreateSkillGroupResponse.fromJson(Map json) { return CreateSkillGroupResponse( skillGroupArn: json['SkillGroupArn'] as String?, @@ -4797,6 +4881,7 @@ class CreateUserResponse { CreateUserResponse({ this.userArn, }); + factory CreateUserResponse.fromJson(Map json) { return CreateUserResponse( userArn: json['UserArn'] as String?, @@ -4806,6 +4891,7 @@ class CreateUserResponse { class DeleteAddressBookResponse { DeleteAddressBookResponse(); + factory DeleteAddressBookResponse.fromJson(Map _) { return DeleteAddressBookResponse(); } @@ -4813,6 +4899,7 @@ class DeleteAddressBookResponse { class DeleteBusinessReportScheduleResponse { DeleteBusinessReportScheduleResponse(); + factory DeleteBusinessReportScheduleResponse.fromJson( Map _) { return DeleteBusinessReportScheduleResponse(); @@ -4821,6 +4908,7 @@ class DeleteBusinessReportScheduleResponse { class DeleteConferenceProviderResponse { DeleteConferenceProviderResponse(); + factory DeleteConferenceProviderResponse.fromJson(Map _) { return DeleteConferenceProviderResponse(); } @@ -4828,6 +4916,7 @@ class DeleteConferenceProviderResponse { class DeleteContactResponse { DeleteContactResponse(); + factory DeleteContactResponse.fromJson(Map _) { return DeleteContactResponse(); } @@ -4835,6 +4924,7 @@ class DeleteContactResponse { class DeleteDeviceResponse { DeleteDeviceResponse(); + factory DeleteDeviceResponse.fromJson(Map _) { return DeleteDeviceResponse(); } @@ -4842,6 +4932,7 @@ class DeleteDeviceResponse { class DeleteDeviceUsageDataResponse { DeleteDeviceUsageDataResponse(); + factory DeleteDeviceUsageDataResponse.fromJson(Map _) { return DeleteDeviceUsageDataResponse(); } @@ -4849,6 +4940,7 @@ class DeleteDeviceUsageDataResponse { class DeleteGatewayGroupResponse { DeleteGatewayGroupResponse(); + factory DeleteGatewayGroupResponse.fromJson(Map _) { return DeleteGatewayGroupResponse(); } @@ -4856,6 +4948,7 @@ class DeleteGatewayGroupResponse { class DeleteNetworkProfileResponse { DeleteNetworkProfileResponse(); + factory DeleteNetworkProfileResponse.fromJson(Map _) { return DeleteNetworkProfileResponse(); } @@ -4863,6 +4956,7 @@ class DeleteNetworkProfileResponse { class DeleteProfileResponse { DeleteProfileResponse(); + factory DeleteProfileResponse.fromJson(Map _) { return DeleteProfileResponse(); } @@ -4870,6 +4964,7 @@ class DeleteProfileResponse { class DeleteRoomResponse { DeleteRoomResponse(); + factory DeleteRoomResponse.fromJson(Map _) { return DeleteRoomResponse(); } @@ -4877,6 +4972,7 @@ class DeleteRoomResponse { class DeleteRoomSkillParameterResponse { DeleteRoomSkillParameterResponse(); + factory DeleteRoomSkillParameterResponse.fromJson(Map _) { return DeleteRoomSkillParameterResponse(); } @@ -4884,6 +4980,7 @@ class DeleteRoomSkillParameterResponse { class DeleteSkillAuthorizationResponse { DeleteSkillAuthorizationResponse(); + factory DeleteSkillAuthorizationResponse.fromJson(Map _) { return DeleteSkillAuthorizationResponse(); } @@ -4891,6 +4988,7 @@ class DeleteSkillAuthorizationResponse { class DeleteSkillGroupResponse { DeleteSkillGroupResponse(); + factory DeleteSkillGroupResponse.fromJson(Map _) { return DeleteSkillGroupResponse(); } @@ -4898,6 +4996,7 @@ class DeleteSkillGroupResponse { class DeleteUserResponse { DeleteUserResponse(); + factory DeleteUserResponse.fromJson(Map _) { return DeleteUserResponse(); } @@ -4923,6 +5022,7 @@ class DeveloperInfo { this.privacyPolicy, this.url, }); + factory DeveloperInfo.fromJson(Map json) { return DeveloperInfo( developerName: json['DeveloperName'] as String?, @@ -4978,6 +5078,7 @@ class Device { this.roomArn, this.softwareVersion, }); + factory Device.fromJson(Map json) { return Device( deviceArn: json['DeviceArn'] as String?, @@ -5056,6 +5157,7 @@ class DeviceData { this.roomName, this.softwareVersion, }); + factory DeviceData.fromJson(Map json) { return DeviceData( createdTime: timeStampFromJson(json['CreatedTime']), @@ -5094,6 +5196,7 @@ class DeviceEvent { this.type, this.value, }); + factory DeviceEvent.fromJson(Map json) { return DeviceEvent( timestamp: timeStampFromJson(json['Timestamp']), @@ -5147,6 +5250,7 @@ class DeviceNetworkProfileInfo { this.certificateExpirationTime, this.networkProfileArn, }); + factory DeviceNetworkProfileInfo.fromJson(Map json) { return DeviceNetworkProfileInfo( certificateArn: json['CertificateArn'] as String?, @@ -5212,6 +5316,7 @@ class DeviceStatusDetail { this.code, this.feature, }); + factory DeviceStatusDetail.fromJson(Map json) { return DeviceStatusDetail( code: (json['Code'] as String?)?.toDeviceStatusDetailCode(), @@ -5339,6 +5444,7 @@ class DeviceStatusInfo { this.connectionStatusUpdatedTime, this.deviceStatusDetails, }); + factory DeviceStatusInfo.fromJson(Map json) { return DeviceStatusInfo( connectionStatus: @@ -5378,6 +5484,7 @@ extension DeviceUsageTypeFromString on String { class DisassociateContactFromAddressBookResponse { DisassociateContactFromAddressBookResponse(); + factory DisassociateContactFromAddressBookResponse.fromJson( Map _) { return DisassociateContactFromAddressBookResponse(); @@ -5386,6 +5493,7 @@ class DisassociateContactFromAddressBookResponse { class DisassociateDeviceFromRoomResponse { DisassociateDeviceFromRoomResponse(); + factory DisassociateDeviceFromRoomResponse.fromJson(Map _) { return DisassociateDeviceFromRoomResponse(); } @@ -5393,6 +5501,7 @@ class DisassociateDeviceFromRoomResponse { class DisassociateSkillFromSkillGroupResponse { DisassociateSkillFromSkillGroupResponse(); + factory DisassociateSkillFromSkillGroupResponse.fromJson( Map _) { return DisassociateSkillFromSkillGroupResponse(); @@ -5401,6 +5510,7 @@ class DisassociateSkillFromSkillGroupResponse { class DisassociateSkillFromUsersResponse { DisassociateSkillFromUsersResponse(); + factory DisassociateSkillFromUsersResponse.fromJson(Map _) { return DisassociateSkillFromUsersResponse(); } @@ -5408,6 +5518,7 @@ class DisassociateSkillFromUsersResponse { class DisassociateSkillGroupFromRoomResponse { DisassociateSkillGroupFromRoomResponse(); + factory DisassociateSkillGroupFromRoomResponse.fromJson( Map _) { return DisassociateSkillGroupFromRoomResponse(); @@ -5516,6 +5627,7 @@ class EndOfMeetingReminder { this.reminderAtMinutes, this.reminderType, }); + factory EndOfMeetingReminder.fromJson(Map json) { return EndOfMeetingReminder( enabled: json['Enabled'] as bool?, @@ -5694,6 +5806,7 @@ class Filter { class ForgetSmartHomeAppliancesResponse { ForgetSmartHomeAppliancesResponse(); + factory ForgetSmartHomeAppliancesResponse.fromJson(Map _) { return ForgetSmartHomeAppliancesResponse(); } @@ -5724,6 +5837,7 @@ class Gateway { this.name, this.softwareVersion, }); + factory Gateway.fromJson(Map json) { return Gateway( arn: json['Arn'] as String?, @@ -5751,6 +5865,7 @@ class GatewayGroup { this.description, this.name, }); + factory GatewayGroup.fromJson(Map json) { return GatewayGroup( arn: json['Arn'] as String?, @@ -5776,6 +5891,7 @@ class GatewayGroupSummary { this.description, this.name, }); + factory GatewayGroupSummary.fromJson(Map json) { return GatewayGroupSummary( arn: json['Arn'] as String?, @@ -5810,6 +5926,7 @@ class GatewaySummary { this.name, this.softwareVersion, }); + factory GatewaySummary.fromJson(Map json) { return GatewaySummary( arn: json['Arn'] as String?, @@ -5828,6 +5945,7 @@ class GetAddressBookResponse { GetAddressBookResponse({ this.addressBook, }); + factory GetAddressBookResponse.fromJson(Map json) { return GetAddressBookResponse( addressBook: json['AddressBook'] != null @@ -5844,6 +5962,7 @@ class GetConferencePreferenceResponse { GetConferencePreferenceResponse({ this.preference, }); + factory GetConferencePreferenceResponse.fromJson(Map json) { return GetConferencePreferenceResponse( preference: json['Preference'] != null @@ -5861,6 +5980,7 @@ class GetConferenceProviderResponse { GetConferenceProviderResponse({ this.conferenceProvider, }); + factory GetConferenceProviderResponse.fromJson(Map json) { return GetConferenceProviderResponse( conferenceProvider: json['ConferenceProvider'] != null @@ -5878,6 +5998,7 @@ class GetContactResponse { GetContactResponse({ this.contact, }); + factory GetContactResponse.fromJson(Map json) { return GetContactResponse( contact: json['Contact'] != null @@ -5894,6 +6015,7 @@ class GetDeviceResponse { GetDeviceResponse({ this.device, }); + factory GetDeviceResponse.fromJson(Map json) { return GetDeviceResponse( device: json['Device'] != null @@ -5909,6 +6031,7 @@ class GetGatewayGroupResponse { GetGatewayGroupResponse({ this.gatewayGroup, }); + factory GetGatewayGroupResponse.fromJson(Map json) { return GetGatewayGroupResponse( gatewayGroup: json['GatewayGroup'] != null @@ -5925,6 +6048,7 @@ class GetGatewayResponse { GetGatewayResponse({ this.gateway, }); + factory GetGatewayResponse.fromJson(Map json) { return GetGatewayResponse( gateway: json['Gateway'] != null @@ -5951,6 +6075,7 @@ class GetInvitationConfigurationResponse { this.organizationName, this.privateSkillIds, }); + factory GetInvitationConfigurationResponse.fromJson( Map json) { return GetInvitationConfigurationResponse( @@ -5971,6 +6096,7 @@ class GetNetworkProfileResponse { GetNetworkProfileResponse({ this.networkProfile, }); + factory GetNetworkProfileResponse.fromJson(Map json) { return GetNetworkProfileResponse( networkProfile: json['NetworkProfile'] != null @@ -5988,6 +6114,7 @@ class GetProfileResponse { GetProfileResponse({ this.profile, }); + factory GetProfileResponse.fromJson(Map json) { return GetProfileResponse( profile: json['Profile'] != null @@ -6004,6 +6131,7 @@ class GetRoomResponse { GetRoomResponse({ this.room, }); + factory GetRoomResponse.fromJson(Map json) { return GetRoomResponse( room: json['Room'] != null @@ -6020,6 +6148,7 @@ class GetRoomSkillParameterResponse { GetRoomSkillParameterResponse({ this.roomSkillParameter, }); + factory GetRoomSkillParameterResponse.fromJson(Map json) { return GetRoomSkillParameterResponse( roomSkillParameter: json['RoomSkillParameter'] != null @@ -6037,6 +6166,7 @@ class GetSkillGroupResponse { GetSkillGroupResponse({ this.skillGroup, }); + factory GetSkillGroupResponse.fromJson(Map json) { return GetSkillGroupResponse( skillGroup: json['SkillGroup'] != null @@ -6058,6 +6188,7 @@ class IPDialIn { required this.commsProtocol, required this.endpoint, }); + factory IPDialIn.fromJson(Map json) { return IPDialIn( commsProtocol: (json['CommsProtocol'] as String).toCommsProtocol(), @@ -6090,6 +6221,7 @@ class InstantBooking { this.durationInMinutes, this.enabled, }); + factory InstantBooking.fromJson(Map json) { return InstantBooking( durationInMinutes: json['DurationInMinutes'] as int?, @@ -6109,6 +6241,7 @@ class ListBusinessReportSchedulesResponse { this.businessReportSchedules, this.nextToken, }); + factory ListBusinessReportSchedulesResponse.fromJson( Map json) { return ListBusinessReportSchedulesResponse( @@ -6133,6 +6266,7 @@ class ListConferenceProvidersResponse { this.conferenceProviders, this.nextToken, }); + factory ListConferenceProvidersResponse.fromJson(Map json) { return ListConferenceProvidersResponse( conferenceProviders: (json['ConferenceProviders'] as List?) @@ -6155,6 +6289,7 @@ class ListDeviceEventsResponse { this.deviceEvents, this.nextToken, }); + factory ListDeviceEventsResponse.fromJson(Map json) { return ListDeviceEventsResponse( deviceEvents: (json['DeviceEvents'] as List?) @@ -6177,6 +6312,7 @@ class ListGatewayGroupsResponse { this.gatewayGroups, this.nextToken, }); + factory ListGatewayGroupsResponse.fromJson(Map json) { return ListGatewayGroupsResponse( gatewayGroups: (json['GatewayGroups'] as List?) @@ -6199,6 +6335,7 @@ class ListGatewaysResponse { this.gateways, this.nextToken, }); + factory ListGatewaysResponse.fromJson(Map json) { return ListGatewaysResponse( gateways: (json['Gateways'] as List?) @@ -6221,6 +6358,7 @@ class ListSkillsResponse { this.nextToken, this.skillSummaries, }); + factory ListSkillsResponse.fromJson(Map json) { return ListSkillsResponse( nextToken: json['NextToken'] as String?, @@ -6243,6 +6381,7 @@ class ListSkillsStoreCategoriesResponse { this.categoryList, this.nextToken, }); + factory ListSkillsStoreCategoriesResponse.fromJson( Map json) { return ListSkillsStoreCategoriesResponse( @@ -6266,6 +6405,7 @@ class ListSkillsStoreSkillsByCategoryResponse { this.nextToken, this.skillsStoreSkills, }); + factory ListSkillsStoreSkillsByCategoryResponse.fromJson( Map json) { return ListSkillsStoreSkillsByCategoryResponse( @@ -6289,6 +6429,7 @@ class ListSmartHomeAppliancesResponse { this.nextToken, this.smartHomeAppliances, }); + factory ListSmartHomeAppliancesResponse.fromJson(Map json) { return ListSmartHomeAppliancesResponse( nextToken: json['NextToken'] as String?, @@ -6311,6 +6452,7 @@ class ListTagsResponse { this.nextToken, this.tags, }); + factory ListTagsResponse.fromJson(Map json) { return ListTagsResponse( nextToken: json['NextToken'] as String?, @@ -6371,6 +6513,7 @@ class MeetingRoomConfiguration { this.requireCheckIn, this.roomUtilizationMetricsEnabled, }); + factory MeetingRoomConfiguration.fromJson(Map json) { return MeetingRoomConfiguration( endOfMeetingReminder: json['EndOfMeetingReminder'] != null @@ -6413,6 +6556,7 @@ class MeetingSetting { MeetingSetting({ required this.requirePin, }); + factory MeetingSetting.fromJson(Map json) { return MeetingSetting( requirePin: (json['RequirePin'] as String).toRequirePin(), @@ -6502,6 +6646,7 @@ class NetworkProfile { this.ssid, this.trustAnchors, }); + factory NetworkProfile.fromJson(Map json) { return NetworkProfile( certificateAuthorityArn: json['CertificateAuthorityArn'] as String?, @@ -6557,6 +6702,7 @@ class NetworkProfileData { this.securityType, this.ssid, }); + factory NetworkProfileData.fromJson(Map json) { return NetworkProfileData( certificateAuthorityArn: json['CertificateAuthorityArn'] as String?, @@ -6637,6 +6783,7 @@ class PSTNDialIn { required this.oneClickPinDelay, required this.phoneNumber, }); + factory PSTNDialIn.fromJson(Map json) { return PSTNDialIn( countryCode: json['CountryCode'] as String, @@ -6673,6 +6820,7 @@ class PhoneNumber { required this.number, required this.type, }); + factory PhoneNumber.fromJson(Map json) { return PhoneNumber( number: json['Number'] as String, @@ -6731,6 +6879,9 @@ class Profile { /// The ARN of the address book. final String? addressBookArn; + /// Whether data retention of the profile is enabled. + final bool? dataRetentionOptIn; + /// The distance unit of a room profile. final DistanceUnit? distanceUnit; @@ -6771,6 +6922,7 @@ class Profile { Profile({ this.address, this.addressBookArn, + this.dataRetentionOptIn, this.distanceUnit, this.isDefault, this.locale, @@ -6784,10 +6936,12 @@ class Profile { this.timezone, this.wakeWord, }); + factory Profile.fromJson(Map json) { return Profile( address: json['Address'] as String?, addressBookArn: json['AddressBookArn'] as String?, + dataRetentionOptIn: json['DataRetentionOptIn'] as bool?, distanceUnit: (json['DistanceUnit'] as String?)?.toDistanceUnit(), isDefault: json['IsDefault'] as bool?, locale: json['Locale'] as String?, @@ -6849,6 +7003,7 @@ class ProfileData { this.timezone, this.wakeWord, }); + factory ProfileData.fromJson(Map json) { return ProfileData( address: json['Address'] as String?, @@ -6867,6 +7022,7 @@ class ProfileData { class PutConferencePreferenceResponse { PutConferencePreferenceResponse(); + factory PutConferencePreferenceResponse.fromJson(Map _) { return PutConferencePreferenceResponse(); } @@ -6874,6 +7030,7 @@ class PutConferencePreferenceResponse { class PutInvitationConfigurationResponse { PutInvitationConfigurationResponse(); + factory PutInvitationConfigurationResponse.fromJson(Map _) { return PutInvitationConfigurationResponse(); } @@ -6881,6 +7038,7 @@ class PutInvitationConfigurationResponse { class PutRoomSkillParameterResponse { PutRoomSkillParameterResponse(); + factory PutRoomSkillParameterResponse.fromJson(Map _) { return PutRoomSkillParameterResponse(); } @@ -6888,6 +7046,7 @@ class PutRoomSkillParameterResponse { class PutSkillAuthorizationResponse { PutSkillAuthorizationResponse(); + factory PutSkillAuthorizationResponse.fromJson(Map _) { return PutSkillAuthorizationResponse(); } @@ -6900,6 +7059,7 @@ class RegisterAVSDeviceResponse { RegisterAVSDeviceResponse({ this.deviceArn, }); + factory RegisterAVSDeviceResponse.fromJson(Map json) { return RegisterAVSDeviceResponse( deviceArn: json['DeviceArn'] as String?, @@ -6909,6 +7069,7 @@ class RegisterAVSDeviceResponse { class RejectSkillResponse { RejectSkillResponse(); + factory RejectSkillResponse.fromJson(Map _) { return RejectSkillResponse(); } @@ -6929,6 +7090,7 @@ class RequireCheckIn { this.enabled, this.releaseAfterMinutes, }); + factory RequireCheckIn.fromJson(Map json) { return RequireCheckIn( enabled: json['Enabled'] as bool?, @@ -6985,6 +7147,7 @@ class ResolveRoomResponse { this.roomName, this.roomSkillParameters, }); + factory ResolveRoomResponse.fromJson(Map json) { return ResolveRoomResponse( roomArn: json['RoomArn'] as String?, @@ -6999,6 +7162,7 @@ class ResolveRoomResponse { class RevokeInvitationResponse { RevokeInvitationResponse(); + factory RevokeInvitationResponse.fromJson(Map _) { return RevokeInvitationResponse(); } @@ -7028,6 +7192,7 @@ class Room { this.roomArn, this.roomName, }); + factory Room.fromJson(Map json) { return Room( description: json['Description'] as String?, @@ -7067,6 +7232,7 @@ class RoomData { this.roomArn, this.roomName, }); + factory RoomData.fromJson(Map json) { return RoomData( description: json['Description'] as String?, @@ -7092,6 +7258,7 @@ class RoomSkillParameter { required this.parameterKey, required this.parameterValue, }); + factory RoomSkillParameter.fromJson(Map json) { return RoomSkillParameter( parameterKey: json['ParameterKey'] as String, @@ -7125,6 +7292,7 @@ class SearchAddressBooksResponse { this.nextToken, this.totalCount, }); + factory SearchAddressBooksResponse.fromJson(Map json) { return SearchAddressBooksResponse( addressBooks: (json['AddressBooks'] as List?) @@ -7152,6 +7320,7 @@ class SearchContactsResponse { this.nextToken, this.totalCount, }); + factory SearchContactsResponse.fromJson(Map json) { return SearchContactsResponse( contacts: (json['Contacts'] as List?) @@ -7179,6 +7348,7 @@ class SearchDevicesResponse { this.nextToken, this.totalCount, }); + factory SearchDevicesResponse.fromJson(Map json) { return SearchDevicesResponse( devices: (json['Devices'] as List?) @@ -7210,6 +7380,7 @@ class SearchNetworkProfilesResponse { this.nextToken, this.totalCount, }); + factory SearchNetworkProfilesResponse.fromJson(Map json) { return SearchNetworkProfilesResponse( networkProfiles: (json['NetworkProfiles'] as List?) @@ -7237,6 +7408,7 @@ class SearchProfilesResponse { this.profiles, this.totalCount, }); + factory SearchProfilesResponse.fromJson(Map json) { return SearchProfilesResponse( nextToken: json['NextToken'] as String?, @@ -7264,6 +7436,7 @@ class SearchRoomsResponse { this.rooms, this.totalCount, }); + factory SearchRoomsResponse.fromJson(Map json) { return SearchRoomsResponse( nextToken: json['NextToken'] as String?, @@ -7291,6 +7464,7 @@ class SearchSkillGroupsResponse { this.skillGroups, this.totalCount, }); + factory SearchSkillGroupsResponse.fromJson(Map json) { return SearchSkillGroupsResponse( nextToken: json['NextToken'] as String?, @@ -7318,6 +7492,7 @@ class SearchUsersResponse { this.totalCount, this.users, }); + factory SearchUsersResponse.fromJson(Map json) { return SearchUsersResponse( nextToken: json['NextToken'] as String?, @@ -7337,6 +7512,7 @@ class SendAnnouncementResponse { SendAnnouncementResponse({ this.announcementArn, }); + factory SendAnnouncementResponse.fromJson(Map json) { return SendAnnouncementResponse( announcementArn: json['AnnouncementArn'] as String?, @@ -7346,6 +7522,7 @@ class SendAnnouncementResponse { class SendInvitationResponse { SendInvitationResponse(); + factory SendInvitationResponse.fromJson(Map _) { return SendInvitationResponse(); } @@ -7363,6 +7540,7 @@ class SipAddress { required this.type, required this.uri, }); + factory SipAddress.fromJson(Map json) { return SipAddress( type: (json['Type'] as String).toSipType(), @@ -7450,6 +7628,7 @@ class SkillDetails { this.reviews, this.skillTypes, }); + factory SkillDetails.fromJson(Map json) { return SkillDetails( bulletPoints: (json['BulletPoints'] as List?) @@ -7499,6 +7678,7 @@ class SkillGroup { this.skillGroupArn, this.skillGroupName, }); + factory SkillGroup.fromJson(Map json) { return SkillGroup( description: json['Description'] as String?, @@ -7524,6 +7704,7 @@ class SkillGroupData { this.skillGroupArn, this.skillGroupName, }); + factory SkillGroupData.fromJson(Map json) { return SkillGroupData( description: json['Description'] as String?, @@ -7558,6 +7739,7 @@ class SkillSummary { this.skillType, this.supportsLinking, }); + factory SkillSummary.fromJson(Map json) { return SkillSummary( enablementType: (json['EnablementType'] as String?)?.toEnablementType(), @@ -7662,6 +7844,7 @@ class SkillsStoreSkill { this.skillName, this.supportsLinking, }); + factory SkillsStoreSkill.fromJson(Map json) { return SkillsStoreSkill( iconUrl: json['IconUrl'] as String?, @@ -7697,6 +7880,7 @@ class SmartHomeAppliance { this.friendlyName, this.manufacturerName, }); + factory SmartHomeAppliance.fromJson(Map json) { return SmartHomeAppliance( description: json['Description'] as String?, @@ -7783,6 +7967,7 @@ class Ssml { class StartDeviceSyncResponse { StartDeviceSyncResponse(); + factory StartDeviceSyncResponse.fromJson(Map _) { return StartDeviceSyncResponse(); } @@ -7790,6 +7975,7 @@ class StartDeviceSyncResponse { class StartSmartHomeApplianceDiscoveryResponse { StartSmartHomeApplianceDiscoveryResponse(); + factory StartSmartHomeApplianceDiscoveryResponse.fromJson( Map _) { return StartSmartHomeApplianceDiscoveryResponse(); @@ -7808,6 +7994,7 @@ class Tag { required this.key, required this.value, }); + factory Tag.fromJson(Map json) { return Tag( key: json['Key'] as String, @@ -7827,6 +8014,7 @@ class Tag { class TagResourceResponse { TagResourceResponse(); + factory TagResourceResponse.fromJson(Map _) { return TagResourceResponse(); } @@ -7884,6 +8072,7 @@ class Text { class UntagResourceResponse { UntagResourceResponse(); + factory UntagResourceResponse.fromJson(Map _) { return UntagResourceResponse(); } @@ -7891,6 +8080,7 @@ class UntagResourceResponse { class UpdateAddressBookResponse { UpdateAddressBookResponse(); + factory UpdateAddressBookResponse.fromJson(Map _) { return UpdateAddressBookResponse(); } @@ -7898,6 +8088,7 @@ class UpdateAddressBookResponse { class UpdateBusinessReportScheduleResponse { UpdateBusinessReportScheduleResponse(); + factory UpdateBusinessReportScheduleResponse.fromJson( Map _) { return UpdateBusinessReportScheduleResponse(); @@ -7906,6 +8097,7 @@ class UpdateBusinessReportScheduleResponse { class UpdateConferenceProviderResponse { UpdateConferenceProviderResponse(); + factory UpdateConferenceProviderResponse.fromJson(Map _) { return UpdateConferenceProviderResponse(); } @@ -7913,6 +8105,7 @@ class UpdateConferenceProviderResponse { class UpdateContactResponse { UpdateContactResponse(); + factory UpdateContactResponse.fromJson(Map _) { return UpdateContactResponse(); } @@ -7920,6 +8113,7 @@ class UpdateContactResponse { class UpdateDeviceResponse { UpdateDeviceResponse(); + factory UpdateDeviceResponse.fromJson(Map _) { return UpdateDeviceResponse(); } @@ -7959,6 +8153,7 @@ class UpdateEndOfMeetingReminder { class UpdateGatewayGroupResponse { UpdateGatewayGroupResponse(); + factory UpdateGatewayGroupResponse.fromJson(Map _) { return UpdateGatewayGroupResponse(); } @@ -7966,6 +8161,7 @@ class UpdateGatewayGroupResponse { class UpdateGatewayResponse { UpdateGatewayResponse(); + factory UpdateGatewayResponse.fromJson(Map _) { return UpdateGatewayResponse(); } @@ -8040,6 +8236,7 @@ class UpdateMeetingRoomConfiguration { class UpdateNetworkProfileResponse { UpdateNetworkProfileResponse(); + factory UpdateNetworkProfileResponse.fromJson(Map _) { return UpdateNetworkProfileResponse(); } @@ -8047,6 +8244,7 @@ class UpdateNetworkProfileResponse { class UpdateProfileResponse { UpdateProfileResponse(); + factory UpdateProfileResponse.fromJson(Map _) { return UpdateProfileResponse(); } @@ -8080,6 +8278,7 @@ class UpdateRequireCheckIn { class UpdateRoomResponse { UpdateRoomResponse(); + factory UpdateRoomResponse.fromJson(Map _) { return UpdateRoomResponse(); } @@ -8087,6 +8286,7 @@ class UpdateRoomResponse { class UpdateSkillGroupResponse { UpdateSkillGroupResponse(); + factory UpdateSkillGroupResponse.fromJson(Map _) { return UpdateSkillGroupResponse(); } @@ -8120,6 +8320,7 @@ class UserData { this.lastName, this.userArn, }); + factory UserData.fromJson(Map json) { return UserData( email: json['Email'] as String?, diff --git a/generated/aws_amplify_api/lib/amplify-2017-07-25.dart b/generated/aws_amplify_api/lib/amplify-2017-07-25.dart index b3d11aebc..98a0fd197 100644 --- a/generated/aws_amplify_api/lib/amplify-2017-07-25.dart +++ b/generated/aws_amplify_api/lib/amplify-2017-07-25.dart @@ -67,9 +67,23 @@ class Amplify { /// The name for an Amplify app. /// /// Parameter [accessToken] : - /// The personal access token for a third-party source control system for an - /// Amplify app. The personal access token is used to create a webhook and a - /// read-only deploy key. The token is not stored. + /// The personal access token for a GitHub repository for an Amplify app. The + /// personal access token is used to authorize access to a GitHub repository + /// using the Amplify GitHub App. The token is not stored. + /// + /// Use accessToken for GitHub repositories only. To authorize + /// access to a repository provider such as Bitbucket or CodeCommit, use + /// oauthToken. + /// + /// You must specify either accessToken or + /// oauthToken when you create a new app. + /// + /// Existing Amplify apps deployed from a GitHub repository using OAuth + /// continue to work with CI/CD. However, we strongly recommend that you + /// migrate these apps to use the GitHub App. For more information, see Migrating + /// an existing OAuth app to the Amplify GitHub App in the Amplify User + /// Guide . /// /// Parameter [autoBranchCreationConfig] : /// The automated branch creation configuration for an Amplify app. @@ -78,7 +92,9 @@ class Amplify { /// The automated branch creation glob patterns for an Amplify app. /// /// Parameter [basicAuthCredentials] : - /// The credentials for basic authorization for an Amplify app. + /// The credentials for basic authorization for an Amplify app. You must + /// base64-encode the authorization credentials and provide them in the format + /// user:password. /// /// Parameter [buildSpec] : /// The build specification (build spec) for an Amplify app. @@ -116,10 +132,28 @@ class Amplify { /// Parameter [oauthToken] : /// The OAuth token for a third-party source control system for an Amplify /// app. The OAuth token is used to create a webhook and a read-only deploy - /// key. The OAuth token is not stored. + /// key using SSH cloning. The OAuth token is not stored. + /// + /// Use oauthToken for repository providers other than GitHub, + /// such as Bitbucket or CodeCommit. To authorize access to GitHub as your + /// repository provider, use accessToken. + /// + /// You must specify either oauthToken or + /// accessToken when you create a new app. + /// + /// Existing Amplify apps deployed from a GitHub repository using OAuth + /// continue to work with CI/CD. However, we strongly recommend that you + /// migrate these apps to use the GitHub App. For more information, see Migrating + /// an existing OAuth app to the Amplify GitHub App in the Amplify User + /// Guide . /// /// Parameter [platform] : - /// The platform or framework for an Amplify app. + /// The platform for the Amplify app. For a static app, set the platform type + /// to WEB. For a dynamic server-side rendered (SSR) app, set the + /// platform type to WEB_COMPUTE. For an app requiring Amplify + /// Hosting's original SSR support only, set the platform type to + /// WEB_DYNAMIC. /// /// Parameter [repository] : /// The repository for an Amplify app. @@ -244,7 +278,9 @@ class Amplify { /// an Amplify app. /// /// Parameter [basicAuthCredentials] : - /// The basic authorization credentials for the branch. + /// The basic authorization credentials for the branch. You must base64-encode + /// the authorization credentials and provide them in the format + /// user:password. /// /// Parameter [buildSpec] : /// The build specification (build spec) for the branch. @@ -1371,9 +1407,23 @@ class Amplify { /// The unique ID for an Amplify app. /// /// Parameter [accessToken] : - /// The personal access token for a third-party source control system for an - /// Amplify app. The token is used to create webhook and a read-only deploy - /// key. The token is not stored. + /// The personal access token for a GitHub repository for an Amplify app. The + /// personal access token is used to authorize access to a GitHub repository + /// using the Amplify GitHub App. The token is not stored. + /// + /// Use accessToken for GitHub repositories only. To authorize + /// access to a repository provider such as Bitbucket or CodeCommit, use + /// oauthToken. + /// + /// You must specify either accessToken or + /// oauthToken when you update an app. + /// + /// Existing Amplify apps deployed from a GitHub repository using OAuth + /// continue to work with CI/CD. However, we strongly recommend that you + /// migrate these apps to use the GitHub App. For more information, see Migrating + /// an existing OAuth app to the Amplify GitHub App in the Amplify User + /// Guide . /// /// Parameter [autoBranchCreationConfig] : /// The automated branch creation configuration for an Amplify app. @@ -1382,7 +1432,9 @@ class Amplify { /// Describes the automated branch creation glob patterns for an Amplify app. /// /// Parameter [basicAuthCredentials] : - /// The basic authorization credentials for an Amplify app. + /// The basic authorization credentials for an Amplify app. You must + /// base64-encode the authorization credentials and provide them in the format + /// user:password. /// /// Parameter [buildSpec] : /// The build specification (build spec) for an Amplify app. @@ -1421,11 +1473,31 @@ class Amplify { /// /// Parameter [oauthToken] : /// The OAuth token for a third-party source control system for an Amplify - /// app. The token is used to create a webhook and a read-only deploy key. The - /// OAuth token is not stored. + /// app. The OAuth token is used to create a webhook and a read-only deploy + /// key using SSH cloning. The OAuth token is not stored. + /// + /// Use oauthToken for repository providers other than GitHub, + /// such as Bitbucket or CodeCommit. + /// + /// To authorize access to GitHub as your repository provider, use + /// accessToken. + /// + /// You must specify either oauthToken or + /// accessToken when you update an app. + /// + /// Existing Amplify apps deployed from a GitHub repository using OAuth + /// continue to work with CI/CD. However, we strongly recommend that you + /// migrate these apps to use the GitHub App. For more information, see Migrating + /// an existing OAuth app to the Amplify GitHub App in the Amplify User + /// Guide . /// /// Parameter [platform] : - /// The platform for an Amplify app. + /// The platform for the Amplify app. For a static app, set the platform type + /// to WEB. For a dynamic server-side rendered (SSR) app, set the + /// platform type to WEB_COMPUTE. For an app requiring Amplify + /// Hosting's original SSR support only, set the platform type to + /// WEB_DYNAMIC. /// /// Parameter [repository] : /// The name of the repository for an Amplify app @@ -1505,7 +1577,9 @@ class Amplify { /// an Amplify app. /// /// Parameter [basicAuthCredentials] : - /// The basic authorization credentials for the branch. + /// The basic authorization credentials for the branch. You must base64-encode + /// the authorization credentials and provide them in the format + /// user:password. /// /// Parameter [buildSpec] : /// The build specification (build spec) for the branch. @@ -1616,9 +1690,6 @@ class Amplify { /// Parameter [domainName] : /// The name of the domain. /// - /// Parameter [subDomainSettings] : - /// Describes the settings for the subdomain. - /// /// Parameter [autoSubDomainCreationPatterns] : /// Sets the branch patterns for automatic subdomain creation. /// @@ -1628,22 +1699,25 @@ class Amplify { /// /// Parameter [enableAutoSubDomain] : /// Enables the automated creation of subdomains for branches. + /// + /// Parameter [subDomainSettings] : + /// Describes the settings for the subdomain. Future updateDomainAssociation({ required String appId, required String domainName, - required List subDomainSettings, List? autoSubDomainCreationPatterns, String? autoSubDomainIAMRole, bool? enableAutoSubDomain, + List? subDomainSettings, }) async { final $payload = { - 'subDomainSettings': subDomainSettings, if (autoSubDomainCreationPatterns != null) 'autoSubDomainCreationPatterns': autoSubDomainCreationPatterns, if (autoSubDomainIAMRole != null) 'autoSubDomainIAMRole': autoSubDomainIAMRole, if (enableAutoSubDomain != null) 'enableAutoSubDomain': enableAutoSubDomain, + if (subDomainSettings != null) 'subDomainSettings': subDomainSettings, }; final response = await _protocol.send( payload: $payload, @@ -1720,10 +1794,14 @@ class App { /// The name for the Amplify app. final String name; - /// The platform for the Amplify app. + /// The platform for the Amplify app. For a static app, set the platform type to + /// WEB. For a dynamic server-side rendered (SSR) app, set the + /// platform type to WEB_COMPUTE. For an app requiring Amplify + /// Hosting's original SSR support only, set the platform type to + /// WEB_DYNAMIC. final Platform platform; - /// The repository for the Amplify app. + /// The Git repository for the Amplify app. final String repository; /// Updates the date and time for the Amplify app. @@ -1735,7 +1813,9 @@ class App { /// Describes the automated branch creation glob patterns for the Amplify app. final List? autoBranchCreationPatterns; - /// The basic authorization credentials for branches for the Amplify app. + /// The basic authorization credentials for branches for the Amplify app. You + /// must base64-encode the authorization credentials and provide them in the + /// format user:password. final String? basicAuthCredentials; /// Describes the content of the build specification (build spec) for the @@ -1762,6 +1842,16 @@ class App { /// Describes the information about a production branch of the Amplify app. final ProductionBranch? productionBranch; + /// + /// This is for internal use. + /// + /// The Amplify service uses this parameter to specify the authentication + /// protocol to use to access the Git repository for an Amplify app. Amplify + /// specifies TOKEN for a GitHub repository, SIGV4 for + /// an Amazon Web Services CodeCommit repository, and SSH for + /// GitLab and Bitbucket repositories. + final RepositoryCloneMethod? repositoryCloneMethod; + /// The tag for the Amplify app. final Map? tags; @@ -1788,8 +1878,10 @@ class App { this.enableBranchAutoDeletion, this.iamServiceRoleArn, this.productionBranch, + this.repositoryCloneMethod, this.tags, }); + factory App.fromJson(Map json) { return App( appArn: json['appArn'] as String, @@ -1828,6 +1920,8 @@ class App { ? ProductionBranch.fromJson( json['productionBranch'] as Map) : null, + repositoryCloneMethod: + (json['repositoryCloneMethod'] as String?)?.toRepositoryCloneMethod(), tags: (json['tags'] as Map?) ?.map((k, e) => MapEntry(k, e as String)), ); @@ -1846,6 +1940,7 @@ class Artifact { required this.artifactFileName, required this.artifactId, }); + factory Artifact.fromJson(Map json) { return Artifact( artifactFileName: json['artifactFileName'] as String, @@ -1856,7 +1951,9 @@ class Artifact { /// Describes the automated branch creation configuration. class AutoBranchCreationConfig { - /// The basic authorization credentials for the autocreated branch. + /// The basic authorization credentials for the autocreated branch. You must + /// base64-encode the authorization credentials and provide them in the format + /// user:password. final String? basicAuthCredentials; /// The build specification (build spec) for the autocreated branch. @@ -1902,6 +1999,7 @@ class AutoBranchCreationConfig { this.pullRequestEnvironmentName, this.stage, }); + factory AutoBranchCreationConfig.fromJson(Map json) { return AutoBranchCreationConfig( basicAuthCredentials: json['basicAuthCredentials'] as String?, @@ -1981,6 +2079,7 @@ class BackendEnvironment { this.deploymentArtifacts, this.stackName, }); + factory BackendEnvironment.fromJson(Map json) { return BackendEnvironment( backendEnvironmentArn: json['backendEnvironmentArn'] as String, @@ -2054,7 +2153,9 @@ class Branch { /// Amplify app. final String? backendEnvironmentArn; - /// The basic authorization credentials for a branch of an Amplify app. + /// The basic authorization credentials for a branch of an Amplify app. You must + /// base64-encode the authorization credentials and provide them in the format + /// user:password. final String? basicAuthCredentials; /// The build specification (build spec) content for the branch of an Amplify @@ -2112,6 +2213,7 @@ class Branch { this.tags, this.thumbnailUrl, }); + factory Branch.fromJson(Map json) { return Branch( activeJobId: json['activeJobId'] as String, @@ -2160,6 +2262,7 @@ class CreateAppResult { CreateAppResult({ required this.app, }); + factory CreateAppResult.fromJson(Map json) { return CreateAppResult( app: App.fromJson(json['app'] as Map), @@ -2175,6 +2278,7 @@ class CreateBackendEnvironmentResult { CreateBackendEnvironmentResult({ required this.backendEnvironment, }); + factory CreateBackendEnvironmentResult.fromJson(Map json) { return CreateBackendEnvironmentResult( backendEnvironment: BackendEnvironment.fromJson( @@ -2192,6 +2296,7 @@ class CreateBranchResult { CreateBranchResult({ required this.branch, }); + factory CreateBranchResult.fromJson(Map json) { return CreateBranchResult( branch: Branch.fromJson(json['branch'] as Map), @@ -2217,6 +2322,7 @@ class CreateDeploymentResult { required this.zipUploadUrl, this.jobId, }); + factory CreateDeploymentResult.fromJson(Map json) { return CreateDeploymentResult( fileUploadUrls: (json['fileUploadUrls'] as Map) @@ -2236,6 +2342,7 @@ class CreateDomainAssociationResult { CreateDomainAssociationResult({ required this.domainAssociation, }); + factory CreateDomainAssociationResult.fromJson(Map json) { return CreateDomainAssociationResult( domainAssociation: DomainAssociation.fromJson( @@ -2252,6 +2359,7 @@ class CreateWebhookResult { CreateWebhookResult({ required this.webhook, }); + factory CreateWebhookResult.fromJson(Map json) { return CreateWebhookResult( webhook: Webhook.fromJson(json['webhook'] as Map), @@ -2291,6 +2399,7 @@ class CustomRule { this.condition, this.status, }); + factory CustomRule.fromJson(Map json) { return CustomRule( source: json['source'] as String, @@ -2321,6 +2430,7 @@ class DeleteAppResult { DeleteAppResult({ required this.app, }); + factory DeleteAppResult.fromJson(Map json) { return DeleteAppResult( app: App.fromJson(json['app'] as Map), @@ -2336,6 +2446,7 @@ class DeleteBackendEnvironmentResult { DeleteBackendEnvironmentResult({ required this.backendEnvironment, }); + factory DeleteBackendEnvironmentResult.fromJson(Map json) { return DeleteBackendEnvironmentResult( backendEnvironment: BackendEnvironment.fromJson( @@ -2353,6 +2464,7 @@ class DeleteBranchResult { DeleteBranchResult({ required this.branch, }); + factory DeleteBranchResult.fromJson(Map json) { return DeleteBranchResult( branch: Branch.fromJson(json['branch'] as Map), @@ -2366,6 +2478,7 @@ class DeleteDomainAssociationResult { DeleteDomainAssociationResult({ required this.domainAssociation, }); + factory DeleteDomainAssociationResult.fromJson(Map json) { return DeleteDomainAssociationResult( domainAssociation: DomainAssociation.fromJson( @@ -2381,6 +2494,7 @@ class DeleteJobResult { DeleteJobResult({ required this.jobSummary, }); + factory DeleteJobResult.fromJson(Map json) { return DeleteJobResult( jobSummary: @@ -2397,6 +2511,7 @@ class DeleteWebhookResult { DeleteWebhookResult({ required this.webhook, }); + factory DeleteWebhookResult.fromJson(Map json) { return DeleteWebhookResult( webhook: Webhook.fromJson(json['webhook'] as Map), @@ -2446,6 +2561,7 @@ class DomainAssociation { this.autoSubDomainIAMRole, this.certificateVerificationDNSRecord, }); + factory DomainAssociation.fromJson(Map json) { return DomainAssociation( domainAssociationArn: json['domainAssociationArn'] as String, @@ -2535,6 +2651,7 @@ class GenerateAccessLogsResult { GenerateAccessLogsResult({ this.logUrl, }); + factory GenerateAccessLogsResult.fromJson(Map json) { return GenerateAccessLogsResult( logUrl: json['logUrl'] as String?, @@ -2548,6 +2665,7 @@ class GetAppResult { GetAppResult({ required this.app, }); + factory GetAppResult.fromJson(Map json) { return GetAppResult( app: App.fromJson(json['app'] as Map), @@ -2567,6 +2685,7 @@ class GetArtifactUrlResult { required this.artifactId, required this.artifactUrl, }); + factory GetArtifactUrlResult.fromJson(Map json) { return GetArtifactUrlResult( artifactId: json['artifactId'] as String, @@ -2583,6 +2702,7 @@ class GetBackendEnvironmentResult { GetBackendEnvironmentResult({ required this.backendEnvironment, }); + factory GetBackendEnvironmentResult.fromJson(Map json) { return GetBackendEnvironmentResult( backendEnvironment: BackendEnvironment.fromJson( @@ -2597,6 +2717,7 @@ class GetBranchResult { GetBranchResult({ required this.branch, }); + factory GetBranchResult.fromJson(Map json) { return GetBranchResult( branch: Branch.fromJson(json['branch'] as Map), @@ -2613,6 +2734,7 @@ class GetDomainAssociationResult { GetDomainAssociationResult({ required this.domainAssociation, }); + factory GetDomainAssociationResult.fromJson(Map json) { return GetDomainAssociationResult( domainAssociation: DomainAssociation.fromJson( @@ -2627,6 +2749,7 @@ class GetJobResult { GetJobResult({ required this.job, }); + factory GetJobResult.fromJson(Map json) { return GetJobResult( job: Job.fromJson(json['job'] as Map), @@ -2642,6 +2765,7 @@ class GetWebhookResult { GetWebhookResult({ required this.webhook, }); + factory GetWebhookResult.fromJson(Map json) { return GetWebhookResult( webhook: Webhook.fromJson(json['webhook'] as Map), @@ -2661,6 +2785,7 @@ class Job { required this.steps, required this.summary, }); + factory Job.fromJson(Map json) { return Job( steps: (json['steps'] as List) @@ -2769,6 +2894,7 @@ class JobSummary { required this.status, this.endTime, }); + factory JobSummary.fromJson(Map json) { return JobSummary( commitId: json['commitId'] as String, @@ -2836,6 +2962,7 @@ class ListAppsResult { required this.apps, this.nextToken, }); + factory ListAppsResult.fromJson(Map json) { return ListAppsResult( apps: (json['apps'] as List) @@ -2860,6 +2987,7 @@ class ListArtifactsResult { required this.artifacts, this.nextToken, }); + factory ListArtifactsResult.fromJson(Map json) { return ListArtifactsResult( artifacts: (json['artifacts'] as List) @@ -2884,6 +3012,7 @@ class ListBackendEnvironmentsResult { required this.backendEnvironments, this.nextToken, }); + factory ListBackendEnvironmentsResult.fromJson(Map json) { return ListBackendEnvironmentsResult( backendEnvironments: (json['backendEnvironments'] as List) @@ -2908,6 +3037,7 @@ class ListBranchesResult { required this.branches, this.nextToken, }); + factory ListBranchesResult.fromJson(Map json) { return ListBranchesResult( branches: (json['branches'] as List) @@ -2932,6 +3062,7 @@ class ListDomainAssociationsResult { required this.domainAssociations, this.nextToken, }); + factory ListDomainAssociationsResult.fromJson(Map json) { return ListDomainAssociationsResult( domainAssociations: (json['domainAssociations'] as List) @@ -2956,6 +3087,7 @@ class ListJobsResult { required this.jobSummaries, this.nextToken, }); + factory ListJobsResult.fromJson(Map json) { return ListJobsResult( jobSummaries: (json['jobSummaries'] as List) @@ -2975,6 +3107,7 @@ class ListTagsForResourceResponse { ListTagsForResourceResponse({ this.tags, }); + factory ListTagsForResourceResponse.fromJson(Map json) { return ListTagsForResourceResponse( tags: (json['tags'] as Map?) @@ -2996,6 +3129,7 @@ class ListWebhooksResult { required this.webhooks, this.nextToken, }); + factory ListWebhooksResult.fromJson(Map json) { return ListWebhooksResult( webhooks: (json['webhooks'] as List) @@ -3009,6 +3143,8 @@ class ListWebhooksResult { enum Platform { web, + webDynamic, + webCompute, } extension PlatformValueExtension on Platform { @@ -3016,6 +3152,10 @@ extension PlatformValueExtension on Platform { switch (this) { case Platform.web: return 'WEB'; + case Platform.webDynamic: + return 'WEB_DYNAMIC'; + case Platform.webCompute: + return 'WEB_COMPUTE'; } } } @@ -3025,6 +3165,10 @@ extension PlatformFromString on String { switch (this) { case 'WEB': return Platform.web; + case 'WEB_DYNAMIC': + return Platform.webDynamic; + case 'WEB_COMPUTE': + return Platform.webCompute; } throw Exception('$this is not known in enum Platform'); } @@ -3050,6 +3194,7 @@ class ProductionBranch { this.status, this.thumbnailUrl, }); + factory ProductionBranch.fromJson(Map json) { return ProductionBranch( branchName: json['branchName'] as String?, @@ -3060,6 +3205,39 @@ class ProductionBranch { } } +enum RepositoryCloneMethod { + ssh, + token, + sigv4, +} + +extension RepositoryCloneMethodValueExtension on RepositoryCloneMethod { + String toValue() { + switch (this) { + case RepositoryCloneMethod.ssh: + return 'SSH'; + case RepositoryCloneMethod.token: + return 'TOKEN'; + case RepositoryCloneMethod.sigv4: + return 'SIGV4'; + } + } +} + +extension RepositoryCloneMethodFromString on String { + RepositoryCloneMethod toRepositoryCloneMethod() { + switch (this) { + case 'SSH': + return RepositoryCloneMethod.ssh; + case 'TOKEN': + return RepositoryCloneMethod.token; + case 'SIGV4': + return RepositoryCloneMethod.sigv4; + } + throw Exception('$this is not known in enum RepositoryCloneMethod'); + } +} + enum Stage { production, beta, @@ -3111,6 +3289,7 @@ class StartDeploymentResult { StartDeploymentResult({ required this.jobSummary, }); + factory StartDeploymentResult.fromJson(Map json) { return StartDeploymentResult( jobSummary: @@ -3127,6 +3306,7 @@ class StartJobResult { StartJobResult({ required this.jobSummary, }); + factory StartJobResult.fromJson(Map json) { return StartJobResult( jobSummary: @@ -3184,6 +3364,7 @@ class Step { this.testArtifactsUrl, this.testConfigUrl, }); + factory Step.fromJson(Map json) { return Step( endTime: nonNullableTimeStampFromJson(json['endTime'] as Object), @@ -3210,6 +3391,7 @@ class StopJobResult { StopJobResult({ required this.jobSummary, }); + factory StopJobResult.fromJson(Map json) { return StopJobResult( jobSummary: @@ -3234,6 +3416,7 @@ class SubDomain { required this.subDomainSetting, required this.verified, }); + factory SubDomain.fromJson(Map json) { return SubDomain( dnsRecord: json['dnsRecord'] as String, @@ -3256,6 +3439,7 @@ class SubDomainSetting { required this.branchName, required this.prefix, }); + factory SubDomainSetting.fromJson(Map json) { return SubDomainSetting( branchName: json['branchName'] as String, @@ -3276,6 +3460,7 @@ class SubDomainSetting { /// The response for the tag resource request. class TagResourceResponse { TagResourceResponse(); + factory TagResourceResponse.fromJson(Map _) { return TagResourceResponse(); } @@ -3284,6 +3469,7 @@ class TagResourceResponse { /// The response for the untag resource request. class UntagResourceResponse { UntagResourceResponse(); + factory UntagResourceResponse.fromJson(Map _) { return UntagResourceResponse(); } @@ -3297,6 +3483,7 @@ class UpdateAppResult { UpdateAppResult({ required this.app, }); + factory UpdateAppResult.fromJson(Map json) { return UpdateAppResult( app: App.fromJson(json['app'] as Map), @@ -3313,6 +3500,7 @@ class UpdateBranchResult { UpdateBranchResult({ required this.branch, }); + factory UpdateBranchResult.fromJson(Map json) { return UpdateBranchResult( branch: Branch.fromJson(json['branch'] as Map), @@ -3329,6 +3517,7 @@ class UpdateDomainAssociationResult { UpdateDomainAssociationResult({ required this.domainAssociation, }); + factory UpdateDomainAssociationResult.fromJson(Map json) { return UpdateDomainAssociationResult( domainAssociation: DomainAssociation.fromJson( @@ -3345,6 +3534,7 @@ class UpdateWebhookResult { UpdateWebhookResult({ required this.webhook, }); + factory UpdateWebhookResult.fromJson(Map json) { return UpdateWebhookResult( webhook: Webhook.fromJson(json['webhook'] as Map), @@ -3384,6 +3574,7 @@ class Webhook { required this.webhookId, required this.webhookUrl, }); + factory Webhook.fromJson(Map json) { return Webhook( branchName: json['branchName'] as String, diff --git a/generated/aws_apigateway_api/lib/apigateway-2015-07-09.dart b/generated/aws_apigateway_api/lib/apigateway-2015-07-09.dart index 0c2421917..f7a8af658 100644 --- a/generated/aws_apigateway_api/lib/apigateway-2015-07-09.dart +++ b/generated/aws_apigateway_api/lib/apigateway-2015-07-09.dart @@ -51,27 +51,24 @@ class APIGateway { _protocol.close(); } - /// Create an ApiKey resource. - /// + /// Create an ApiKey resource. /// - /// May throw [UnauthorizedException]. - /// May throw [NotFoundException]. - /// May throw [TooManyRequestsException]. - /// May throw [LimitExceededException]. /// May throw [BadRequestException]. /// May throw [ConflictException]. + /// May throw [LimitExceededException]. + /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. + /// May throw [TooManyRequestsException]. /// /// Parameter [customerId] : /// An AWS Marketplace customer identifier , when integrating with the AWS /// SaaS Marketplace. /// /// Parameter [description] : - /// The description of the ApiKey. + /// The description of the ApiKey. /// /// Parameter [enabled] : - /// Specifies whether the ApiKey can be used by callers. + /// Specifies whether the ApiKey can be used by callers. /// /// Parameter [generateDistinctId] : /// Specifies whether (true) or not (false) the key @@ -79,7 +76,7 @@ class APIGateway { /// deprecated and should not be used. /// /// Parameter [name] : - /// The name of the ApiKey. + /// The name of the ApiKey. /// /// Parameter [stageKeys] : /// DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key. @@ -120,28 +117,25 @@ class APIGateway { return ApiKey.fromJson(response); } - /// Adds a new Authorizer resource to an existing RestApi - /// resource. - /// + /// Adds a new Authorizer resource to an existing RestApi resource. /// /// May throw [BadRequestException]. - /// May throw [UnauthorizedException]. - /// May throw [NotFoundException]. + /// May throw [ConflictException]. /// May throw [LimitExceededException]. + /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [name] : - /// [Required] The name of the authorizer. + /// The name of the authorizer. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [type] : - /// [Required] The authorizer type. Valid values are TOKEN for a - /// Lambda function using a single authorization token submitted in a custom - /// header, REQUEST for a Lambda function using incoming request + /// The authorizer type. Valid values are TOKEN for a Lambda + /// function using a single authorization token submitted in a custom header, + /// REQUEST for a Lambda function using incoming request /// parameters, and COGNITO_USER_POOLS for using an Amazon /// Cognito user pool. /// @@ -175,19 +169,17 @@ class APIGateway { /// /2015-03-31/functions/[FunctionARN]/invocations. /// /// Parameter [identitySource] : - /// The identity source for which authorization is requested. - ///
        - ///
      • For a TOKEN or COGNITO_USER_POOLS - /// authorizer, this is required and specifies the request header mapping - /// expression for the custom header holding the authorization token submitted - /// by the client. For example, if the token header name is Auth, - /// the header mapping expression is - /// method.request.header.Auth.
      • - ///
      • For the REQUEST authorizer, this is required when - /// authorization caching is enabled. The value is a comma-separated string of - /// one or more mapping expressions of the specified request parameters. For - /// example, if an Auth header, a Name query string - /// parameter are defined as identity sources, this value is + /// The identity source for which authorization is requested. For a + /// TOKEN or COGNITO_USER_POOLS authorizer, this is + /// required and specifies the request header mapping expression for the + /// custom header holding the authorization token submitted by the client. For + /// example, if the token header name is Auth, the header mapping + /// expression is method.request.header.Auth. For the + /// REQUEST authorizer, this is required when authorization + /// caching is enabled. The value is a comma-separated string of one or more + /// mapping expressions of the specified request parameters. For example, if + /// an Auth header, a Name query string parameter + /// are defined as identity sources, this value is /// method.request.header.Auth, method.request.querystring.Name. /// These parameters will be used to derive the authorization caching key and /// to perform runtime validation of the REQUEST authorizer by @@ -197,8 +189,7 @@ class APIGateway { /// response without calling the Lambda function. The valid value is a string /// of comma-separated mapping expressions of the specified request /// parameters. When the authorization caching is not enabled, this property - /// is optional.
      • - ///
      + /// is optional. /// /// Parameter [identityValidationExpression] : /// A validation expression for the incoming identity token. For @@ -252,20 +243,20 @@ class APIGateway { return Authorizer.fromJson(response); } - /// Creates a new BasePathMapping resource. + /// Creates a new BasePathMapping resource. /// - /// May throw [UnauthorizedException]. - /// May throw [ConflictException]. /// May throw [BadRequestException]. + /// May throw [ConflictException]. + /// May throw [LimitExceededException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [domainName] : - /// [Required] The domain name of the BasePathMapping resource to - /// create. + /// The domain name of the BasePathMapping resource to create. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [basePath] : /// The base path name that callers of the API must provide as part of the URL @@ -298,51 +289,50 @@ class APIGateway { return BasePathMapping.fromJson(response); } - /// Creates a Deployment resource, which makes a specified - /// RestApi callable over the internet. + /// Creates a Deployment resource, which makes a specified RestApi callable + /// over the internet. /// - /// May throw [UnauthorizedException]. /// May throw [BadRequestException]. - /// May throw [NotFoundException]. /// May throw [ConflictException]. /// May throw [LimitExceededException]. + /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// May throw [ServiceUnavailableException]. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [cacheClusterEnabled] : - /// Enables a cache cluster for the Stage resource specified in the - /// input. + /// Enables a cache cluster for the Stage resource specified in the input. /// /// Parameter [cacheClusterSize] : - /// Specifies the cache cluster size for the Stage resource specified - /// in the input, if a cache cluster is enabled. + /// The stage's cache capacity in GB. For more information about choosing a + /// cache size, see Enabling + /// API caching to enhance responsiveness. /// /// Parameter [canarySettings] : /// The input configuration for the canary deployment when the deployment is a /// canary release deployment. /// /// Parameter [description] : - /// The description for the Deployment resource to create. + /// The description for the Deployment resource to create. /// /// Parameter [stageDescription] : - /// The description of the Stage resource for the Deployment - /// resource to create. + /// The description of the Stage resource for the Deployment resource to + /// create. /// /// Parameter [stageName] : - /// The name of the Stage resource for the Deployment resource - /// to create. + /// The name of the Stage resource for the Deployment resource to create. /// /// Parameter [tracingEnabled] : - /// Specifies whether active tracing with X-ray is enabled for the - /// Stage. + /// Specifies whether active tracing with X-ray is enabled for the Stage. /// /// Parameter [variables] : - /// A map that defines the stage variables for the Stage resource that - /// is associated with the new deployment. Variable names can have - /// alphanumeric and underscore characters, and the values must match + /// A map that defines the stage variables for the Stage resource that is + /// associated with the new deployment. Variable names can have alphanumeric + /// and underscore characters, and the values must match /// [A-Za-z0-9-._~:/?#&=,]+. Future createDeployment({ required String restApiId, @@ -376,25 +366,26 @@ class APIGateway { return Deployment.fromJson(response); } + /// Creates a documentation part. /// /// May throw [BadRequestException]. /// May throw [ConflictException]. - /// May throw [UnauthorizedException]. - /// May throw [NotFoundException]. /// May throw [LimitExceededException]. + /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [location] : - /// [Required] The location of the targeted API entity of the to-be-created - /// documentation part. + /// The location of the targeted API entity of the to-be-created documentation + /// part. /// /// Parameter [properties] : - /// [Required] The new documentation content map of the targeted API entity. - /// Enclosed key-value pairs are API-specific, but only OpenAPI-compliant - /// key-value pairs can be exported and, hence, published. + /// The new documentation content map of the targeted API entity. Enclosed + /// key-value pairs are API-specific, but only OpenAPI-compliant key-value + /// pairs can be exported and, hence, published. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future createDocumentationPart({ required DocumentationPartLocation location, required String properties, @@ -414,19 +405,20 @@ class APIGateway { return DocumentationPart.fromJson(response); } + /// Creates a documentation version /// /// May throw [BadRequestException]. /// May throw [ConflictException]. - /// May throw [UnauthorizedException]. - /// May throw [NotFoundException]. /// May throw [LimitExceededException]. + /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [documentationVersion] : - /// [Required] The version identifier of the new snapshot. + /// The version identifier of the new snapshot. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [description] : /// A description about the new documentation snapshot. @@ -456,13 +448,14 @@ class APIGateway { /// Creates a new domain name. /// - /// May throw [UnauthorizedException]. /// May throw [BadRequestException]. /// May throw [ConflictException]. + /// May throw [LimitExceededException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [domainName] : - /// [Required] The name of the DomainName resource. + /// The name of the DomainName resource. /// /// Parameter [certificateArn] : /// The reference to an AWS-managed certificate that will be used by @@ -492,8 +485,13 @@ class APIGateway { /// private key. /// /// Parameter [endpointConfiguration] : - /// The endpoint configuration of this DomainName showing the endpoint - /// types of the domain name. + /// The endpoint configuration of this DomainName showing the endpoint types + /// of the domain name. + /// + /// Parameter [ownershipVerificationCertificateArn] : + /// The ARN of the public certificate issued by ACM to validate ownership of + /// your custom domain. Only required when configuring mutual TLS and using an + /// ACM imported or private CA certificate ARN as the regionalCertificateArn. /// /// Parameter [regionalCertificateArn] : /// The reference to an AWS-managed certificate that will be used by regional @@ -506,7 +504,7 @@ class APIGateway { /// /// Parameter [securityPolicy] : /// The Transport Layer Security (TLS) version + cipher suite for this - /// DomainName. The valid values are TLS_1_0 and + /// DomainName. The valid values are TLS_1_0 and /// TLS_1_2. /// /// Parameter [tags] : @@ -522,6 +520,7 @@ class APIGateway { String? certificatePrivateKey, EndpointConfiguration? endpointConfiguration, MutualTlsAuthenticationInput? mutualTlsAuthentication, + String? ownershipVerificationCertificateArn, String? regionalCertificateArn, String? regionalCertificateName, SecurityPolicy? securityPolicy, @@ -539,6 +538,9 @@ class APIGateway { 'endpointConfiguration': endpointConfiguration, if (mutualTlsAuthentication != null) 'mutualTlsAuthentication': mutualTlsAuthentication, + if (ownershipVerificationCertificateArn != null) + 'ownershipVerificationCertificateArn': + ownershipVerificationCertificateArn, if (regionalCertificateArn != null) 'regionalCertificateArn': regionalCertificateArn, if (regionalCertificateName != null) @@ -555,32 +557,30 @@ class APIGateway { return DomainName.fromJson(response); } - /// Adds a new Model resource to an existing RestApi resource. + /// Adds a new Model resource to an existing RestApi resource. /// /// May throw [BadRequestException]. - /// May throw [UnauthorizedException]. - /// May throw [NotFoundException]. /// May throw [ConflictException]. /// May throw [LimitExceededException]. + /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [contentType] : - /// [Required] The content-type for the model. + /// The content-type for the model. /// /// Parameter [name] : - /// [Required] The name of the model. Must be alphanumeric. + /// The name of the model. Must be alphanumeric. /// /// Parameter [restApiId] : - /// [Required] The RestApi identifier under which the Model will - /// be created. + /// The RestApi identifier under which the Model will be created. /// /// Parameter [description] : /// The description of the model. /// /// Parameter [schema] : /// The schema for the model. For application/json models, this - /// should be JSON schema draft 4 model. + /// should be JSON schema draft 4 model. Future createModel({ required String contentType, required String name, @@ -603,19 +603,20 @@ class APIGateway { return Model.fromJson(response); } - /// Creates a ReqeustValidator of a given RestApi. + /// Creates a RequestValidator of a given RestApi. /// /// May throw [BadRequestException]. - /// May throw [UnauthorizedException]. - /// May throw [NotFoundException]. + /// May throw [ConflictException]. /// May throw [LimitExceededException]. + /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [name] : - /// The name of the to-be-created RequestValidator. + /// The name of the to-be-created RequestValidator. /// /// Parameter [validateRequestBody] : /// A Boolean flag to indicate whether to validate request body according to @@ -648,7 +649,7 @@ class APIGateway { return RequestValidator.fromJson(response); } - /// Creates a Resource resource. + /// Creates a Resource resource. /// /// May throw [UnauthorizedException]. /// May throw [NotFoundException]. @@ -658,13 +659,13 @@ class APIGateway { /// May throw [TooManyRequestsException]. /// /// Parameter [parentId] : - /// [Required] The parent resource's identifier. + /// The parent resource's identifier. /// /// Parameter [pathPart] : /// The last path segment for this resource. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future createResource({ required String parentId, required String pathPart, @@ -683,46 +684,45 @@ class APIGateway { return Resource.fromJson(response); } - /// Creates a new RestApi resource. + /// Creates a new RestApi resource. /// - /// May throw [UnauthorizedException]. - /// May throw [LimitExceededException]. /// May throw [BadRequestException]. + /// May throw [ConflictException]. + /// May throw [LimitExceededException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [name] : - /// [Required] The name of the RestApi. + /// The name of the RestApi. /// /// Parameter [apiKeySource] : /// The source of the API key for metering requests according to a usage plan. - /// Valid values are: - ///
        - ///
      • HEADER to read the API key from the - /// X-API-Key header of a request.
      • - ///
      • AUTHORIZER to read the API key from the - /// UsageIdentifierKey from a custom authorizer.
      • - ///
      + /// Valid values are: >HEADER to read the API key from the + /// X-API-Key header of a request. AUTHORIZER to + /// read the API key from the UsageIdentifierKey from a custom + /// authorizer. /// /// Parameter [binaryMediaTypes] : - /// The list of binary media types supported by the RestApi. By - /// default, the RestApi supports only UTF-8-encoded text payloads. + /// The list of binary media types supported by the RestApi. By default, the + /// RestApi supports only UTF-8-encoded text payloads. /// /// Parameter [cloneFrom] : - /// The ID of the RestApi that you want to clone from. + /// The ID of the RestApi that you want to clone from. /// /// Parameter [description] : - /// The description of the RestApi. + /// The description of the RestApi. /// /// Parameter [disableExecuteApiEndpoint] : /// Specifies whether clients can invoke your API by using the default /// execute-api endpoint. By default, clients can invoke your API - /// with the default https://{api_id}.execute-api.{region}.amazonaws.com - /// endpoint. To require that clients use a custom domain name to invoke your - /// API, disable the default endpoint. + /// with the default + /// https://{api_id}.execute-api.{region}.amazonaws.com endpoint. + /// To require that clients use a custom domain name to invoke your API, + /// disable the default endpoint /// /// Parameter [endpointConfiguration] : - /// The endpoint configuration of this RestApi showing the endpoint - /// types of the API. + /// The endpoint configuration of this RestApi showing the endpoint types of + /// the API. /// /// Parameter [minimumCompressionSize] : /// A nullable integer that is used to enable compression (with non-negative @@ -734,7 +734,7 @@ class APIGateway { /// /// Parameter [policy] : /// A stringified JSON policy document that applies to this RestApi regardless - /// of the caller and Method configuration. + /// of the caller and Method configuration. /// /// Parameter [tags] : /// The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. @@ -781,8 +781,8 @@ class APIGateway { return RestApi.fromJson(response); } - /// Creates a new Stage resource that references a pre-existing - /// Deployment for the API. + /// Creates a new Stage resource that references a pre-existing Deployment for + /// the API. /// /// May throw [UnauthorizedException]. /// May throw [BadRequestException]. @@ -792,28 +792,29 @@ class APIGateway { /// May throw [TooManyRequestsException]. /// /// Parameter [deploymentId] : - /// [Required] The identifier of the Deployment resource for the - /// Stage resource. + /// The identifier of the Deployment resource for the Stage resource. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [stageName] : - /// [Required] The name for the Stage resource. Stage names can only - /// contain alphanumeric characters, hyphens, and underscores. Maximum length - /// is 128 characters. + /// The name for the Stage resource. Stage names can only contain alphanumeric + /// characters, hyphens, and underscores. Maximum length is 128 characters. /// /// Parameter [cacheClusterEnabled] : /// Whether cache clustering is enabled for the stage. /// /// Parameter [cacheClusterSize] : - /// The stage's cache cluster size. + /// The stage's cache capacity in GB. For more information about choosing a + /// cache size, see Enabling + /// API caching to enhance responsiveness. /// /// Parameter [canarySettings] : /// The canary deployment settings of this stage. /// /// Parameter [description] : - /// The description of the Stage resource. + /// The description of the Stage resource. /// /// Parameter [documentationVersion] : /// The version of the associated API documentation. @@ -824,11 +825,10 @@ class APIGateway { /// aws:. The tag value can be up to 256 characters. /// /// Parameter [tracingEnabled] : - /// Specifies whether active tracing with X-ray is enabled for the - /// Stage. + /// Specifies whether active tracing with X-ray is enabled for the Stage. /// /// Parameter [variables] : - /// A map that defines the stage variables for the new Stage resource. + /// A map that defines the stage variables for the new Stage resource. /// Variable names can have alphanumeric and underscore characters, and the /// values must match [A-Za-z0-9-._~:/?#&=,]+. Future createStage({ @@ -872,14 +872,14 @@ class APIGateway { /// associated API stages, specified in the payload. /// /// May throw [BadRequestException]. - /// May throw [UnauthorizedException]. - /// May throw [TooManyRequestsException]. - /// May throw [LimitExceededException]. /// May throw [ConflictException]. + /// May throw [LimitExceededException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. + /// May throw [TooManyRequestsException]. /// /// Parameter [name] : - /// [Required] The name of the usage plan. + /// The name of the usage plan. /// /// Parameter [apiStages] : /// The associated API stages of the usage plan. @@ -926,21 +926,20 @@ class APIGateway { /// /// May throw [BadRequestException]. /// May throw [ConflictException]. - /// May throw [UnauthorizedException]. + /// May throw [LimitExceededException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [keyId] : - /// [Required] The identifier of a UsagePlanKey resource for a plan - /// customer. + /// The identifier of a UsagePlanKey resource for a plan customer. /// /// Parameter [keyType] : - /// [Required] The type of a UsagePlanKey resource for a plan customer. + /// The type of a UsagePlanKey resource for a plan customer. /// /// Parameter [usagePlanId] : - /// [Required] The Id of the UsagePlan resource representing the usage - /// plan containing the to-be-created UsagePlanKey resource - /// representing a plan customer. + /// The Id of the UsagePlan resource representing the usage plan containing + /// the to-be-created UsagePlanKey resource representing a plan customer. Future createUsagePlanKey({ required String keyId, required String keyType, @@ -964,17 +963,19 @@ class APIGateway { /// become operational. The caller must have permissions to create and update /// VPC Endpoint services. /// - /// May throw [UnauthorizedException]. /// May throw [BadRequestException]. + /// May throw [ConflictException]. + /// May throw [LimitExceededException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [name] : - /// [Required] The name used to label and identify the VPC link. + /// The name used to label and identify the VPC link. /// /// Parameter [targetArns] : - /// [Required] The ARN of the network load balancer of the VPC targeted by the - /// VPC link. The network load balancer must be owned by the same AWS account - /// of the API owner. + /// The ARN of the network load balancer of the VPC targeted by the VPC link. + /// The network load balancer must be owned by the same AWS account of the API + /// owner. /// /// Parameter [description] : /// The description of the VPC link. @@ -1004,14 +1005,16 @@ class APIGateway { return VpcLink.fromJson(response); } - /// Deletes the ApiKey resource. + /// Deletes the ApiKey resource. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. + /// May throw [ConflictException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [apiKey] : - /// [Required] The identifier of the ApiKey resource to be deleted. + /// The identifier of the ApiKey resource to be deleted. Future deleteApiKey({ required String apiKey, }) async { @@ -1023,22 +1026,19 @@ class APIGateway { ); } - /// Deletes an existing Authorizer resource. - /// + /// Deletes an existing Authorizer resource. /// - /// May throw [UnauthorizedException]. - /// May throw [NotFoundException]. - /// May throw [TooManyRequestsException]. /// May throw [BadRequestException]. /// May throw [ConflictException]. + /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. + /// May throw [TooManyRequestsException]. /// /// Parameter [authorizerId] : - /// [Required] The identifier of the Authorizer resource. + /// The identifier of the Authorizer resource. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future deleteAuthorizer({ required String authorizerId, required String restApiId, @@ -1052,24 +1052,22 @@ class APIGateway { ); } - /// Deletes the BasePathMapping resource. + /// Deletes the BasePathMapping resource. /// - /// May throw [UnauthorizedException]. - /// May throw [NotFoundException]. - /// May throw [ConflictException]. /// May throw [BadRequestException]. + /// May throw [ConflictException]. + /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [basePath] : - /// [Required] The base path name of the BasePathMapping resource to - /// delete. + /// The base path name of the BasePathMapping resource to delete. /// /// To specify an empty base path, set this parameter to /// '(none)'. /// /// Parameter [domainName] : - /// [Required] The domain name of the BasePathMapping resource to - /// delete. + /// The domain name of the BasePathMapping resource to delete. Future deleteBasePathMapping({ required String basePath, required String domainName, @@ -1083,16 +1081,16 @@ class APIGateway { ); } - /// Deletes the ClientCertificate resource. + /// Deletes the ClientCertificate resource. /// - /// May throw [UnauthorizedException]. - /// May throw [TooManyRequestsException]. /// May throw [BadRequestException]. + /// May throw [ConflictException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. + /// May throw [TooManyRequestsException]. /// /// Parameter [clientCertificateId] : - /// [Required] The identifier of the ClientCertificate resource to be - /// deleted. + /// The identifier of the ClientCertificate resource to be deleted. Future deleteClientCertificate({ required String clientCertificateId, }) async { @@ -1105,19 +1103,21 @@ class APIGateway { ); } - /// Deletes a Deployment resource. Deleting a deployment will only - /// succeed if there are no Stage resources associated with it. + /// Deletes a Deployment resource. Deleting a deployment will only succeed if + /// there are no Stage resources associated with it. /// - /// May throw [UnauthorizedException]. - /// May throw [NotFoundException]. /// May throw [BadRequestException]. + /// May throw [ConflictException]. + /// May throw [LimitExceededException]. + /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [deploymentId] : - /// [Required] The identifier of the Deployment resource to delete. + /// The identifier of the Deployment resource to delete. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future deleteDeployment({ required String deploymentId, required String restApiId, @@ -1131,18 +1131,19 @@ class APIGateway { ); } + /// Deletes a documentation part /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. + /// May throw [ConflictException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. - /// May throw [ConflictException]. - /// May throw [BadRequestException]. /// /// Parameter [documentationPartId] : - /// [Required] The identifier of the to-be-deleted documentation part. + /// The identifier of the to-be-deleted documentation part. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future deleteDocumentationPart({ required String documentationPartId, required String restApiId, @@ -1156,19 +1157,19 @@ class APIGateway { ); } + /// Deletes a documentation version. /// - /// May throw [UnauthorizedException]. - /// May throw [NotFoundException]. /// May throw [BadRequestException]. /// May throw [ConflictException]. + /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [documentationVersion] : - /// [Required] The version identifier of a to-be-deleted documentation - /// snapshot. + /// The version identifier of a to-be-deleted documentation snapshot. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future deleteDocumentationVersion({ required String documentationVersion, required String restApiId, @@ -1182,15 +1183,16 @@ class APIGateway { ); } - /// Deletes the DomainName resource. + /// Deletes the DomainName resource. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. + /// May throw [ConflictException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. - /// May throw [BadRequestException]. /// /// Parameter [domainName] : - /// [Required] The name of the DomainName resource to be deleted. + /// The name of the DomainName resource to be deleted. Future deleteDomainName({ required String domainName, }) async { @@ -1202,46 +1204,20 @@ class APIGateway { ); } - /// Clears any customization of a GatewayResponse of a specified - /// response type on the given RestApi and resets it with the default - /// settings. + /// Clears any customization of a GatewayResponse of a specified response type + /// on the given RestApi and resets it with the default settings. /// - /// May throw [UnauthorizedException]. - /// May throw [NotFoundException]. - /// May throw [TooManyRequestsException]. /// May throw [BadRequestException]. /// May throw [ConflictException]. + /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. + /// May throw [TooManyRequestsException]. /// /// Parameter [responseType] : - /// [Required] - /// The response type of the associated GatewayResponse. Valid values - /// are - ///
        - ///
      • ACCESS_DENIED
      • - ///
      • API_CONFIGURATION_ERROR
      • - ///
      • AUTHORIZER_FAILURE
      • - ///
      • AUTHORIZER_CONFIGURATION_ERROR
      • - ///
      • BAD_REQUEST_PARAMETERS
      • - ///
      • BAD_REQUEST_BODY
      • - ///
      • DEFAULT_4XX
      • - ///
      • DEFAULT_5XX
      • - ///
      • EXPIRED_TOKEN
      • - ///
      • INVALID_SIGNATURE
      • - ///
      • INTEGRATION_FAILURE
      • - ///
      • INTEGRATION_TIMEOUT
      • - ///
      • INVALID_API_KEY
      • - ///
      • MISSING_AUTHENTICATION_TOKEN
      • - ///
      • QUOTA_EXCEEDED
      • - ///
      • REQUEST_TOO_LARGE
      • - ///
      • RESOURCE_NOT_FOUND
      • - ///
      • THROTTLED
      • - ///
      • UNAUTHORIZED
      • - ///
      • UNSUPPORTED_MEDIA_TYPE
      • - ///
      - /// + /// The response type of the associated GatewayResponse. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future deleteGatewayResponse({ required GatewayResponseType responseType, required String restApiId, @@ -1257,19 +1233,20 @@ class APIGateway { /// Represents a delete integration. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. + /// May throw [ConflictException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. - /// May throw [ConflictException]. /// /// Parameter [httpMethod] : - /// [Required] Specifies a delete integration request's HTTP method. + /// Specifies a delete integration request's HTTP method. /// /// Parameter [resourceId] : - /// [Required] Specifies a delete integration request's resource identifier. + /// Specifies a delete integration request's resource identifier. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future deleteIntegration({ required String httpMethod, required String resourceId, @@ -1286,24 +1263,23 @@ class APIGateway { /// Represents a delete integration response. /// - /// May throw [UnauthorizedException]. - /// May throw [NotFoundException]. - /// May throw [TooManyRequestsException]. /// May throw [BadRequestException]. /// May throw [ConflictException]. + /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. + /// May throw [TooManyRequestsException]. /// /// Parameter [httpMethod] : - /// [Required] Specifies a delete integration response request's HTTP method. + /// Specifies a delete integration response request's HTTP method. /// /// Parameter [resourceId] : - /// [Required] Specifies a delete integration response request's resource - /// identifier. + /// Specifies a delete integration response request's resource identifier. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [statusCode] : - /// [Required] Specifies a delete integration response request's status code. + /// Specifies a delete integration response request's status code. Future deleteIntegrationResponse({ required String httpMethod, required String resourceId, @@ -1319,7 +1295,7 @@ class APIGateway { ); } - /// Deletes an existing Method resource. + /// Deletes an existing Method resource. /// /// May throw [UnauthorizedException]. /// May throw [NotFoundException]. @@ -1327,13 +1303,13 @@ class APIGateway { /// May throw [ConflictException]. /// /// Parameter [httpMethod] : - /// [Required] The HTTP verb of the Method resource. + /// The HTTP verb of the Method resource. /// /// Parameter [resourceId] : - /// [Required] The Resource identifier for the Method resource. + /// The Resource identifier for the Method resource. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future deleteMethod({ required String httpMethod, required String resourceId, @@ -1348,7 +1324,7 @@ class APIGateway { ); } - /// Deletes an existing MethodResponse resource. + /// Deletes an existing MethodResponse resource. /// /// May throw [UnauthorizedException]. /// May throw [NotFoundException]. @@ -1357,18 +1333,16 @@ class APIGateway { /// May throw [ConflictException]. /// /// Parameter [httpMethod] : - /// [Required] The HTTP verb of the Method resource. + /// The HTTP verb of the Method resource. /// /// Parameter [resourceId] : - /// [Required] The Resource identifier for the MethodResponse - /// resource. + /// The Resource identifier for the MethodResponse resource. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [statusCode] : - /// [Required] The status code identifier for the MethodResponse - /// resource. + /// The status code identifier for the MethodResponse resource. Future deleteMethodResponse({ required String httpMethod, required String resourceId, @@ -1386,17 +1360,17 @@ class APIGateway { /// Deletes a model. /// - /// May throw [UnauthorizedException]. - /// May throw [NotFoundException]. - /// May throw [TooManyRequestsException]. /// May throw [BadRequestException]. /// May throw [ConflictException]. + /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. + /// May throw [TooManyRequestsException]. /// /// Parameter [modelName] : - /// [Required] The name of the model to delete. + /// The name of the model to delete. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future deleteModel({ required String modelName, required String restApiId, @@ -1410,19 +1384,19 @@ class APIGateway { ); } - /// Deletes a RequestValidator of a given RestApi. + /// Deletes a RequestValidator of a given RestApi. /// - /// May throw [UnauthorizedException]. - /// May throw [NotFoundException]. - /// May throw [TooManyRequestsException]. /// May throw [BadRequestException]. /// May throw [ConflictException]. + /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. + /// May throw [TooManyRequestsException]. /// /// Parameter [requestValidatorId] : - /// [Required] The identifier of the RequestValidator to be deleted. + /// The identifier of the RequestValidator to be deleted. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future deleteRequestValidator({ required String requestValidatorId, required String restApiId, @@ -1436,7 +1410,7 @@ class APIGateway { ); } - /// Deletes a Resource resource. + /// Deletes a Resource resource. /// /// May throw [UnauthorizedException]. /// May throw [NotFoundException]. @@ -1445,10 +1419,10 @@ class APIGateway { /// May throw [TooManyRequestsException]. /// /// Parameter [resourceId] : - /// [Required] The identifier of the Resource resource. + /// The identifier of the Resource resource. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future deleteResource({ required String resourceId, required String restApiId, @@ -1464,13 +1438,14 @@ class APIGateway { /// Deletes the specified API. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. + /// May throw [ConflictException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. - /// May throw [BadRequestException]. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future deleteRestApi({ required String restApiId, }) async { @@ -1482,18 +1457,20 @@ class APIGateway { ); } - /// Deletes a Stage resource. + /// Deletes a Stage resource. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. + /// May throw [ConflictException]. + /// May throw [LimitExceededException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. - /// May throw [BadRequestException]. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [stageName] : - /// [Required] The name of the Stage resource to delete. + /// The name of the Stage resource to delete. Future deleteStage({ required String restApiId, required String stageName, @@ -1509,13 +1486,14 @@ class APIGateway { /// Deletes a usage plan of a given plan Id. /// - /// May throw [UnauthorizedException]. - /// May throw [TooManyRequestsException]. /// May throw [BadRequestException]. + /// May throw [ConflictException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. + /// May throw [TooManyRequestsException]. /// /// Parameter [usagePlanId] : - /// [Required] The Id of the to-be-deleted usage plan. + /// The Id of the to-be-deleted usage plan. Future deleteUsagePlan({ required String usagePlanId, }) async { @@ -1532,17 +1510,16 @@ class APIGateway { /// /// May throw [BadRequestException]. /// May throw [ConflictException]. - /// May throw [UnauthorizedException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [keyId] : - /// [Required] The Id of the UsagePlanKey resource to be deleted. + /// The Id of the UsagePlanKey resource to be deleted. /// /// Parameter [usagePlanId] : - /// [Required] The Id of the UsagePlan resource representing the usage - /// plan containing the to-be-deleted UsagePlanKey resource - /// representing a plan customer. + /// The Id of the UsagePlan resource representing the usage plan containing + /// the to-be-deleted UsagePlanKey resource representing a plan customer. Future deleteUsagePlanKey({ required String keyId, required String usagePlanId, @@ -1556,16 +1533,17 @@ class APIGateway { ); } - /// Deletes an existing VpcLink of a specified identifier. + /// Deletes an existing VpcLink of a specified identifier. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. + /// May throw [ConflictException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. - /// May throw [BadRequestException]. /// /// Parameter [vpcLinkId] : - /// [Required] The identifier of the VpcLink. It is used in an - /// Integration to reference this VpcLink. + /// The identifier of the VpcLink. It is used in an Integration to reference + /// this VpcLink. Future deleteVpcLink({ required String vpcLinkId, }) async { @@ -1579,13 +1557,15 @@ class APIGateway { /// Flushes all authorizer cache entries on a stage. /// - /// May throw [UnauthorizedException]. - /// May throw [NotFoundException]. /// May throw [BadRequestException]. + /// May throw [ConflictException]. + /// May throw [LimitExceededException]. + /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [restApiId] : - /// The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [stageName] : /// The name of the stage to flush. @@ -1604,16 +1584,18 @@ class APIGateway { /// Flushes a stage's cache. /// - /// May throw [UnauthorizedException]. - /// May throw [NotFoundException]. /// May throw [BadRequestException]. + /// May throw [ConflictException]. + /// May throw [LimitExceededException]. + /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [stageName] : - /// [Required] The name of the stage to flush its cache. + /// The name of the stage to flush its cache. Future flushStageCache({ required String restApiId, required String stageName, @@ -1627,14 +1609,16 @@ class APIGateway { ); } - /// Generates a ClientCertificate resource. + /// Generates a ClientCertificate resource. /// + /// May throw [BadRequestException]. + /// May throw [ConflictException]. + /// May throw [LimitExceededException]. /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. - /// May throw [LimitExceededException]. /// /// Parameter [description] : - /// The description of the ClientCertificate. + /// The description of the ClientCertificate. /// /// Parameter [tags] : /// The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. @@ -1657,10 +1641,11 @@ class APIGateway { return ClientCertificate.fromJson(response); } - /// Gets information about the current Account resource. + /// Gets information about the current Account resource. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. Future getAccount() async { final response = await _protocol.send( @@ -1672,14 +1657,15 @@ class APIGateway { return Account.fromJson(response); } - /// Gets information about the current ApiKey resource. + /// Gets information about the current ApiKey resource. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [apiKey] : - /// [Required] The identifier of the ApiKey resource. + /// The identifier of the ApiKey resource. /// /// Parameter [includeValue] : /// A boolean flag to specify whether (true) or not @@ -1701,9 +1687,10 @@ class APIGateway { return ApiKey.fromJson(response); } - /// Gets information about the current ApiKeys resource. + /// Gets information about the current ApiKeys resource. /// /// May throw [BadRequestException]. + /// May throw [NotFoundException]. /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// @@ -1748,20 +1735,18 @@ class APIGateway { return ApiKeys.fromJson(response); } - /// Describe an existing Authorizer resource. - /// + /// Describe an existing Authorizer resource. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [authorizerId] : - /// [Required] The identifier of the Authorizer resource. + /// The identifier of the Authorizer resource. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future getAuthorizer({ required String authorizerId, required String restApiId, @@ -1776,18 +1761,15 @@ class APIGateway { return Authorizer.fromJson(response); } - /// Describe an existing Authorizers resource. - /// + /// Describe an existing Authorizers resource. /// /// May throw [BadRequestException]. - /// May throw [UnauthorizedException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [limit] : /// The maximum number of returned results per page. The default value is 25 @@ -1814,21 +1796,21 @@ class APIGateway { return Authorizers.fromJson(response); } - /// Describe a BasePathMapping resource. + /// Describe a BasePathMapping resource. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [basePath] : - /// [Required] The base path name that callers of the API must provide as part - /// of the URL after the domain name. This value must be unique for all of the - /// mappings across a single API. Specify '(none)' if you do not want callers - /// to specify any base path name after the domain name. + /// The base path name that callers of the API must provide as part of the URL + /// after the domain name. This value must be unique for all of the mappings + /// across a single API. Specify '(none)' if you do not want callers to + /// specify any base path name after the domain name. /// /// Parameter [domainName] : - /// [Required] The domain name of the BasePathMapping resource to be - /// described. + /// The domain name of the BasePathMapping resource to be described. Future getBasePathMapping({ required String basePath, required String domainName, @@ -1843,14 +1825,15 @@ class APIGateway { return BasePathMapping.fromJson(response); } - /// Represents a collection of BasePathMapping resources. + /// Represents a collection of BasePathMapping resources. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [domainName] : - /// [Required] The domain name of a BasePathMapping resource. + /// The domain name of a BasePathMapping resource. /// /// Parameter [limit] : /// The maximum number of returned results per page. The default value is 25 @@ -1878,15 +1861,15 @@ class APIGateway { return BasePathMappings.fromJson(response); } - /// Gets information about the current ClientCertificate resource. + /// Gets information about the current ClientCertificate resource. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [clientCertificateId] : - /// [Required] The identifier of the ClientCertificate resource to be - /// described. + /// The identifier of the ClientCertificate resource to be described. Future getClientCertificate({ required String clientCertificateId, }) async { @@ -1900,9 +1883,10 @@ class APIGateway { return ClientCertificate.fromJson(response); } - /// Gets a collection of ClientCertificate resources. + /// Gets a collection of ClientCertificate resources. /// /// May throw [BadRequestException]. + /// May throw [NotFoundException]. /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// @@ -1930,25 +1914,25 @@ class APIGateway { return ClientCertificates.fromJson(response); } - /// Gets information about a Deployment resource. + /// Gets information about a Deployment resource. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// May throw [ServiceUnavailableException]. /// /// Parameter [deploymentId] : - /// [Required] The identifier of the Deployment resource to get - /// information about. + /// The identifier of the Deployment resource to get information about. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [embed] : /// A query parameter to retrieve the specified embedded resources of the - /// returned Deployment resource in the response. In a REST API call, - /// this embed parameter value is a list of comma-separated - /// strings, as in GET + /// returned Deployment resource in the response. In a REST API call, this + /// embed parameter value is a list of comma-separated strings, + /// as in GET /// /restapis/{restapi_id}/deployments/{deployment_id}?embed=var1,var2. /// The SDK and other platform-dependent libraries might use a different /// format for the list. Currently, this request supports only retrieval of @@ -1975,7 +1959,7 @@ class APIGateway { return Deployment.fromJson(response); } - /// Gets information about a Deployments collection. + /// Gets information about a Deployments collection. /// /// May throw [BadRequestException]. /// May throw [NotFoundException]. @@ -1984,7 +1968,7 @@ class APIGateway { /// May throw [ServiceUnavailableException]. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [limit] : /// The maximum number of returned results per page. The default value is 25 @@ -2011,16 +1995,18 @@ class APIGateway { return Deployments.fromJson(response); } + /// Gets a documentation part. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [documentationPartId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future getDocumentationPart({ required String documentationPartId, required String restApiId, @@ -2035,14 +2021,15 @@ class APIGateway { return DocumentationPart.fromJson(response); } + /// Gets documentation parts. /// /// May throw [BadRequestException]. - /// May throw [UnauthorizedException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [limit] : /// The maximum number of returned results per page. The default value is 25 @@ -2050,9 +2037,9 @@ class APIGateway { /// /// Parameter [locationStatus] : /// The status of the API documentation parts to retrieve. Valid values are - /// DOCUMENTED for retrieving DocumentationPart resources - /// with content and UNDOCUMENTED for DocumentationPart - /// resources without content. + /// DOCUMENTED for retrieving DocumentationPart resources with + /// content and UNDOCUMENTED for DocumentationPart resources + /// without content. /// /// Parameter [nameQuery] : /// The name of API entities of the to-be-retrieved documentation parts. @@ -2093,17 +2080,17 @@ class APIGateway { return DocumentationParts.fromJson(response); } + /// Gets a documentation version. /// /// May throw [UnauthorizedException]. /// May throw [NotFoundException]. /// May throw [TooManyRequestsException]. /// /// Parameter [documentationVersion] : - /// [Required] The version identifier of the to-be-retrieved documentation - /// snapshot. + /// The version identifier of the to-be-retrieved documentation snapshot. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future getDocumentationVersion({ required String documentationVersion, required String restApiId, @@ -2118,6 +2105,7 @@ class APIGateway { return DocumentationVersion.fromJson(response); } + /// Gets documentation versions. /// /// May throw [BadRequestException]. /// May throw [UnauthorizedException]. @@ -2125,7 +2113,7 @@ class APIGateway { /// May throw [TooManyRequestsException]. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [limit] : /// The maximum number of returned results per page. The default value is 25 @@ -2156,13 +2144,13 @@ class APIGateway { /// Represents a domain name that is contained in a simpler, more intuitive /// URL that can be called. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. /// May throw [NotFoundException]. - /// May throw [ServiceUnavailableException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [domainName] : - /// [Required] The name of the DomainName resource. + /// The name of the DomainName resource. Future getDomainName({ required String domainName, }) async { @@ -2175,9 +2163,10 @@ class APIGateway { return DomainName.fromJson(response); } - /// Represents a collection of DomainName resources. + /// Represents a collection of DomainName resources. /// /// May throw [BadRequestException]. + /// May throw [NotFoundException]. /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// @@ -2205,23 +2194,24 @@ class APIGateway { return DomainNames.fromJson(response); } - /// Exports a deployed version of a RestApi in a specified format. + /// Exports a deployed version of a RestApi in a specified format. /// - /// May throw [UnauthorizedException]. - /// May throw [NotFoundException]. /// May throw [BadRequestException]. /// May throw [ConflictException]. + /// May throw [LimitExceededException]. + /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [exportType] : - /// [Required] The type of export. Acceptable values are 'oas30' for OpenAPI - /// 3.0.x and 'swagger' for Swagger/OpenAPI 2.0. + /// The type of export. Acceptable values are 'oas30' for OpenAPI 3.0.x and + /// 'swagger' for Swagger/OpenAPI 2.0. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [stageName] : - /// [Required] The name of the Stage that will be exported. + /// The name of the Stage that will be exported. /// /// Parameter [accepts] : /// The content-type of the export, for example application/json. @@ -2274,43 +2264,18 @@ class APIGateway { ); } - /// Gets a GatewayResponse of a specified response type on the given - /// RestApi. + /// Gets a GatewayResponse of a specified response type on the given RestApi. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [responseType] : - /// [Required] - /// The response type of the associated GatewayResponse. Valid values - /// are - ///
        - ///
      • ACCESS_DENIED
      • - ///
      • API_CONFIGURATION_ERROR
      • - ///
      • AUTHORIZER_FAILURE
      • - ///
      • AUTHORIZER_CONFIGURATION_ERROR
      • - ///
      • BAD_REQUEST_PARAMETERS
      • - ///
      • BAD_REQUEST_BODY
      • - ///
      • DEFAULT_4XX
      • - ///
      • DEFAULT_5XX
      • - ///
      • EXPIRED_TOKEN
      • - ///
      • INVALID_SIGNATURE
      • - ///
      • INTEGRATION_FAILURE
      • - ///
      • INTEGRATION_TIMEOUT
      • - ///
      • INVALID_API_KEY
      • - ///
      • MISSING_AUTHENTICATION_TOKEN
      • - ///
      • QUOTA_EXCEEDED
      • - ///
      • REQUEST_TOO_LARGE
      • - ///
      • RESOURCE_NOT_FOUND
      • - ///
      • THROTTLED
      • - ///
      • UNAUTHORIZED
      • - ///
      • UNSUPPORTED_MEDIA_TYPE
      • - ///
      - /// + /// The response type of the associated GatewayResponse. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future getGatewayResponse({ required GatewayResponseType responseType, required String restApiId, @@ -2325,28 +2290,28 @@ class APIGateway { return GatewayResponse.fromJson(response); } - /// Gets the GatewayResponses collection on the given RestApi. - /// If an API developer has not added any definitions for gateway responses, - /// the result will be the API Gateway-generated default - /// GatewayResponses collection for the supported response types. + /// Gets the GatewayResponses collection on the given RestApi. If an API + /// developer has not added any definitions for gateway responses, the result + /// will be the API Gateway-generated default GatewayResponses collection for + /// the supported response types. /// /// May throw [BadRequestException]. - /// May throw [UnauthorizedException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [limit] : /// The maximum number of returned results per page. The default value is 25 - /// and the maximum value is 500. The GatewayResponses collection does - /// not support pagination and the limit does not apply here. + /// and the maximum value is 500. The GatewayResponses collection does not + /// support pagination and the limit does not apply here. /// /// Parameter [position] : /// The current pagination position in the paged result set. The - /// GatewayResponse collection does not support pagination and the - /// position does not apply here. + /// GatewayResponse collection does not support pagination and the position + /// does not apply here. Future getGatewayResponses({ required String restApiId, int? limit, @@ -2369,18 +2334,19 @@ class APIGateway { /// Get the integration settings. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [httpMethod] : - /// [Required] Specifies a get integration request's HTTP method. + /// Specifies a get integration request's HTTP method. /// /// Parameter [resourceId] : - /// [Required] Specifies a get integration request's resource identifier + /// Specifies a get integration request's resource identifier /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future getIntegration({ required String httpMethod, required String resourceId, @@ -2398,22 +2364,22 @@ class APIGateway { /// Represents a get integration response. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [httpMethod] : - /// [Required] Specifies a get integration response request's HTTP method. + /// Specifies a get integration response request's HTTP method. /// /// Parameter [resourceId] : - /// [Required] Specifies a get integration response request's resource - /// identifier. + /// Specifies a get integration response request's resource identifier. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [statusCode] : - /// [Required] Specifies a get integration response request's status code. + /// Specifies a get integration response request's status code. Future getIntegrationResponse({ required String httpMethod, required String resourceId, @@ -2430,20 +2396,20 @@ class APIGateway { return IntegrationResponse.fromJson(response); } - /// Describe an existing Method resource. + /// Describe an existing Method resource. /// /// May throw [UnauthorizedException]. /// May throw [NotFoundException]. /// May throw [TooManyRequestsException]. /// /// Parameter [httpMethod] : - /// [Required] Specifies the method request's HTTP method type. + /// Specifies the method request's HTTP method type. /// /// Parameter [resourceId] : - /// [Required] The Resource identifier for the Method resource. + /// The Resource identifier for the Method resource. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future getMethod({ required String httpMethod, required String resourceId, @@ -2459,24 +2425,23 @@ class APIGateway { return Method.fromJson(response); } - /// Describes a MethodResponse resource. + /// Describes a MethodResponse resource. /// /// May throw [UnauthorizedException]. /// May throw [NotFoundException]. /// May throw [TooManyRequestsException]. /// /// Parameter [httpMethod] : - /// [Required] The HTTP verb of the Method resource. + /// The HTTP verb of the Method resource. /// /// Parameter [resourceId] : - /// [Required] The Resource identifier for the MethodResponse - /// resource. + /// The Resource identifier for the MethodResponse resource. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. /// /// Parameter [statusCode] : - /// [Required] The status code for the MethodResponse resource. + /// The status code for the MethodResponse resource. Future getMethodResponse({ required String httpMethod, required String resourceId, @@ -2493,18 +2458,18 @@ class APIGateway { return MethodResponse.fromJson(response); } - /// Describes an existing model defined for a RestApi resource. + /// Describes an existing model defined for a RestApi resource. /// - /// May throw [UnauthorizedException]. + /// May throw [BadRequestException]. /// May throw [NotFoundException]. + /// May throw [UnauthorizedException]. /// May throw [TooManyRequestsException]. /// /// Parameter [modelName] : - /// [Required] The name of the model as an identifier. + /// The name of the model as an identifier. /// /// Parameter [restApiId] : - /// [Required] The RestApi identifier under which the Model - /// exists. + /// The RestApi identifier under which the Model exists. /// /// Parameter [flatten] : /// A query parameter of a Boolean value to resolve (true) all @@ -2538,10 +2503,10 @@ class APIGateway { /// May throw [TooManyRequestsException]. /// /// Parameter [modelName] : - /// [Required] The name of the model for which to generate a template. + /// The name of the model for which to generate a template. /// /// Parameter [restApiId] : - /// [Required] The string identifier of the associated RestApi. + /// The string identifier of the associated RestApi. Future