UNPKG

5.79 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7import {UseDualstackConfigOptions} from '../lib/config_use_dualstack';
8interface Blob {}
9declare class S3Control extends Service {
10 /**
11 * Constructs a service object. This object has one method for each API operation.
12 */
13 constructor(options?: S3Control.Types.ClientConfiguration)
14 config: Config & S3Control.Types.ClientConfiguration;
15 /**
16 * Removes the Public Access Block configuration for an Amazon Web Services account.
17 */
18 deletePublicAccessBlock(params: S3Control.Types.DeletePublicAccessBlockRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
19 /**
20 * Removes the Public Access Block configuration for an Amazon Web Services account.
21 */
22 deletePublicAccessBlock(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
23 /**
24 * Retrieves the Public Access Block configuration for an Amazon Web Services account.
25 */
26 getPublicAccessBlock(params: S3Control.Types.GetPublicAccessBlockRequest, callback?: (err: AWSError, data: S3Control.Types.GetPublicAccessBlockOutput) => void): Request<S3Control.Types.GetPublicAccessBlockOutput, AWSError>;
27 /**
28 * Retrieves the Public Access Block configuration for an Amazon Web Services account.
29 */
30 getPublicAccessBlock(callback?: (err: AWSError, data: S3Control.Types.GetPublicAccessBlockOutput) => void): Request<S3Control.Types.GetPublicAccessBlockOutput, AWSError>;
31 /**
32 * Creates or modifies the Public Access Block configuration for an Amazon Web Services account.
33 */
34 putPublicAccessBlock(params: S3Control.Types.PutPublicAccessBlockRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
35 /**
36 * Creates or modifies the Public Access Block configuration for an Amazon Web Services account.
37 */
38 putPublicAccessBlock(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
39}
40declare namespace S3Control {
41 export type AccountId = string;
42 export interface DeletePublicAccessBlockRequest {
43 /**
44 * The Account ID for the Amazon Web Services account whose Public Access Block configuration you want to remove.
45 */
46 AccountId: AccountId;
47 }
48 export interface GetPublicAccessBlockOutput {
49 /**
50 * The Public Access Block configuration currently in effect for this Amazon Web Services account.
51 */
52 PublicAccessBlockConfiguration?: PublicAccessBlockConfiguration;
53 }
54 export interface GetPublicAccessBlockRequest {
55 /**
56 * The Account ID for the Amazon Web Services account whose Public Access Block configuration you want to retrieve.
57 */
58 AccountId: AccountId;
59 }
60 export interface PublicAccessBlockConfiguration {
61 /**
62 * Specifies whether Amazon S3 should block public ACLs for buckets in this account. Setting this element to TRUE causes the following behavior: PUT Bucket acl and PUT Object acl calls will fail if the specified ACL allows public access. PUT Object calls will fail if the request includes an object ACL. Note that enabling this setting doesn't affect existing policies or ACLs.
63 */
64 BlockPublicAcls?: Setting;
65 /**
66 * Specifies whether Amazon S3 should ignore public ACLs for buckets in this account. Setting this element to TRUE causes Amazon S3 to ignore all public ACLs on buckets in this account and any objects that they contain. Note that enabling this setting doesn't affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set.
67 */
68 IgnorePublicAcls?: Setting;
69 /**
70 * Specifies whether Amazon S3 should block public bucket policies for buckets in this account. Setting this element to TRUE causes Amazon S3 to reject calls to PUT Bucket policy if the specified bucket policy allows public access. Note that enabling this setting doesn't affect existing bucket policies.
71 */
72 BlockPublicPolicy?: Setting;
73 /**
74 * Specifies whether Amazon S3 should restrict public bucket policies for buckets in this account. If this element is set to TRUE, then only the bucket owner and AWS Services can access buckets with public policies. Note that enabling this setting doesn't affect previously stored bucket policies, except that public and cross-account access within any public bucket policy, including non-public delegation to specific accounts, is blocked.
75 */
76 RestrictPublicBuckets?: Setting;
77 }
78 export interface PutPublicAccessBlockRequest {
79 /**
80 * The Public Access Block configuration that you want to apply to this Amazon Web Services account.
81 */
82 PublicAccessBlockConfiguration: PublicAccessBlockConfiguration;
83 /**
84 * The Account ID for the Amazon Web Services account whose Public Access Block configuration you want to set.
85 */
86 AccountId: AccountId;
87 }
88 export type Setting = boolean;
89 /**
90 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
91 */
92 export type apiVersion = "2018-08-20"|"latest"|string;
93 export interface ClientApiVersions {
94 /**
95 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
96 */
97 apiVersion?: apiVersion;
98 }
99 export type ClientConfiguration = ServiceConfigurationOptions & UseDualstackConfigOptions & ClientApiVersions;
100 /**
101 * Contains interfaces for use with the S3Control client.
102 */
103 export import Types = S3Control;
104}
105export = S3Control;