Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_init_create_client(self, backend, aws_params, metadata):
logger = self.AWSLogger(backend, aws_params)
assert isinstance(
logger.client, botocore.client.BaseClient)
from typing import Optional
from botocore.client import BaseClient
from typing import Dict
from typing import Union
from botocore.paginate import Paginator
from botocore.waiter import Waiter
from typing import List
class Client(BaseClient):
def batch_get_repositories(self, repositoryNames: List) -> Dict:
pass
def can_paginate(self, operation_name: str = None):
pass
def create_branch(self, repositoryName: str, branchName: str, commitId: str):
pass
def create_commit(self, repositoryName: str, branchName: str, parentCommitId: str = None, authorName: str = None, email: str = None, commitMessage: str = None, keepEmptyFolders: bool = None, putFiles: List = None, deleteFiles: List = None, setFileModes: List = None) -> Dict:
pass
def create_pull_request(self, title: str, targets: List, description: str = None, clientRequestToken: str = None) -> Dict:
pass
def create_repository(self, repositoryName: str, repositoryDescription: str = None) -> Dict:
from typing import Optional
from botocore.client import BaseClient
from typing import Dict
from typing import Union
from botocore.paginate import Paginator
from botocore.waiter import Waiter
from typing import List
class Client(BaseClient):
def build_suggesters(self, DomainName: str) -> Dict:
pass
def can_paginate(self, operation_name: str = None):
pass
def create_domain(self, DomainName: str) -> Dict:
pass
def define_analysis_scheme(self, DomainName: str, AnalysisScheme: Dict) -> Dict:
pass
def define_expression(self, DomainName: str, Expression: Dict) -> Dict:
pass
def define_index_field(self, DomainName: str, IndexField: Dict) -> Dict:
from typing import Optional
from botocore.client import BaseClient
from typing import Dict
from botocore.paginate import Paginator
from botocore.waiter import Waiter
from typing import Union
from typing import List
class Client(BaseClient):
def add_permission(self, QueueUrl: str, Label: str, AWSAccountIds: List, Actions: List):
"""
Adds a permission to a queue for a specific `principal `__ . This allows sharing access to the queue.
When you create a queue, you have full control access rights for the queue. Only you, the owner of the queue, can grant or deny permissions to the queue. For more information about these permissions, see `Allow Developers to Write Messages to a Shared Queue `__ in the *Amazon Simple Queue Service Developer Guide* .
.. note::
``AddPermission`` writes an Amazon-SQS-generated policy. If you want to write your own policy, use `` SetQueueAttributes `` to upload your policy. For more information about writing your own policy, see `Using Custom Policies with the Amazon SQS Access Policy Language `__ in the *Amazon Simple Queue Service Developer Guide* .
An Amazon SQS policy can have a maximum of 7 actions.
Some actions take lists of parameters. These lists are specified using the ``param.n`` notation. Values of ``n`` are integers starting from 1. For example, a parameter list with two elements looks like this:
``&Attribute.1=first``
``&Attribute.2=second``
.. note::
Cross-account permissions don't apply to this action. For more information, see see `Grant Cross-Account Permissions to a Role and a User Name `__ in the *Amazon Simple Queue Service Developer Guide* .
See also: `AWS API Documentation `_
**Request Syntax**
::
from typing import Optional
from botocore.client import BaseClient
from typing import Dict
from botocore.paginate import Paginator
from botocore.waiter import Waiter
from typing import Union
from typing import List
class Client(BaseClient):
def can_paginate(self, operation_name: str = None):
"""
Check if an operation can be paginated.
:type operation_name: string
:param operation_name: The operation name. This is the same name
as the method name on the client. For example, if the
method name is ``create_foo``, and you\'d normally invoke the
operation as ``client.create_foo(**kwargs)``, if the
``create_foo`` operation can be paginated, you can use the
call ``client.get_paginator(\"create_foo\")``.
:return: ``True`` if the operation can be paginated,
``False`` otherwise.
"""
pass
def create_environment_ec2(self, name: str, instanceType: str, description: str = None, clientRequestToken: str = None, subnetId: str = None, automaticStopTimeMinutes: int = None, ownerArn: str = None) -> Dict:
from typing import Optional
from botocore.client import BaseClient
from typing import Dict
from typing import Union
from botocore.paginate import Paginator
from botocore.waiter import Waiter
from typing import List
class Client(BaseClient):
def associate_drt_log_bucket(self, LogBucket: str) -> Dict:
pass
def associate_drt_role(self, RoleArn: str) -> Dict:
pass
def can_paginate(self, operation_name: str = None):
pass
def create_protection(self, Name: str, ResourceArn: str) -> Dict:
pass
def create_subscription(self) -> Dict:
pass
def delete_protection(self, ProtectionId: str) -> Dict:
from typing import Optional
from botocore.client import BaseClient
from typing import Dict
from botocore.paginate import Paginator
from botocore.waiter import Waiter
from typing import Union
from typing import List
class Client(BaseClient):
def associate_kms_key(self, logGroupName: str, kmsKeyId: str):
"""
Associates the specified AWS Key Management Service (AWS KMS) customer master key (CMK) with the specified log group.
Associating an AWS KMS CMK with a log group overrides any existing associations between the log group and a CMK. After a CMK is associated with a log group, all newly ingested data for the log group is encrypted using the CMK. This association is stored as long as the data encrypted with the CMK is still within Amazon CloudWatch Logs. This enables Amazon CloudWatch Logs to decrypt this data whenever it is requested.
Note that it can take up to 5 minutes for this operation to take effect.
If you attempt to associate a CMK with a log group but the CMK does not exist or the CMK is disabled, you will receive an ``InvalidParameterException`` error.
See also: `AWS API Documentation `_
**Request Syntax**
::
response = client.associate_kms_key(
logGroupName='string',
kmsKeyId='string'
)
:type logGroupName: string
:param logGroupName: **[REQUIRED]**
from typing import Optional
from botocore.client import BaseClient
from typing import Dict
from typing import Union
from botocore.paginate import Paginator
from botocore.waiter import Waiter
from typing import List
class Client(BaseClient):
def associate_member_account(self, memberAccountId: str):
pass
def associate_s3_resources(self, s3Resources: List, memberAccountId: str = None) -> Dict:
pass
def can_paginate(self, operation_name: str = None):
pass
def disassociate_member_account(self, memberAccountId: str):
pass
def disassociate_s3_resources(self, associatedS3Resources: List, memberAccountId: str = None) -> Dict:
pass
def generate_presigned_url(self, ClientMethod: str = None, Params: Dict = None, ExpiresIn: int = None, HttpMethod: str = None):
from typing import Optional
from botocore.client import BaseClient
from typing import Dict
from typing import Union
from botocore.paginate import Paginator
from datetime import datetime
from botocore.waiter import Waiter
from typing import List
class Client(BaseClient):
def can_paginate(self, operation_name: str = None):
pass
def create_app(self, name: str = None, description: str = None, roleName: str = None, clientToken: str = None, serverGroups: List = None, tags: List = None) -> Dict:
pass
def create_replication_job(self, serverId: str, seedReplicationTime: datetime, frequency: int = None, runOnce: bool = None, licenseType: str = None, roleName: str = None, description: str = None, numberOfRecentAmisToKeep: int = None, encrypted: bool = None, kmsKeyId: str = None) -> Dict:
pass
def delete_app(self, appId: str = None, forceStopAppReplication: bool = None, forceTerminateApp: bool = None) -> Dict:
pass
def delete_app_launch_configuration(self, appId: str = None) -> Dict:
pass
def delete_app_replication_configuration(self, appId: str = None) -> Dict:
from typing import Optional
from botocore.client import BaseClient
from typing import Dict
from botocore.paginate import Paginator
from botocore.waiter import Waiter
from typing import Union
from typing import List
class Client(BaseClient):
def associate_delegate_to_resource(self, OrganizationId: str, ResourceId: str, EntityId: str) -> Dict:
"""
Adds a member (user or group) to the resource's set of delegates.
See also: `AWS API Documentation `_
**Request Syntax**
::
response = client.associate_delegate_to_resource(
OrganizationId='string',
ResourceId='string',
EntityId='string'
)
**Response Syntax**
::
{}