Skip to content

CodeStarNotificationsClient#

Index > CodeStarNotifications > CodeStarNotificationsClient

Auto-generated documentation for CodeStarNotifications type annotations stubs module mypy-boto3-codestar-notifications.

CodeStarNotificationsClient#

Type annotations and code completion for boto3.client("codestar-notifications"). boto3 documentation

# CodeStarNotificationsClient usage example

from boto3.session import Session
from mypy_boto3_codestar_notifications.client import CodeStarNotificationsClient

def get_codestar-notifications_client() -> CodeStarNotificationsClient:
    return Session().client("codestar-notifications")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("codestar-notifications").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("codestar-notifications")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.ConcurrentModificationException,
    client.exceptions.ConfigurationException,
    client.exceptions.InvalidNextTokenException,
    client.exceptions.LimitExceededException,
    client.exceptions.ResourceAlreadyExistsException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_codestar_notifications.client import Exceptions

def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...

Methods#

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("codestar-notifications").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("codestar-notifications").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

create_notification_rule#

Creates a notification rule for a resource.

Type annotations and code completion for boto3.client("codestar-notifications").create_notification_rule method. boto3 documentation

# create_notification_rule method definition

def create_notification_rule(
    self,
    *,
    Name: str,
    EventTypeIds: Sequence[str],
    Resource: str,
    Targets: Sequence[TargetTypeDef],  # (1)
    DetailType: DetailTypeType,  # (2)
    ClientRequestToken: str = ...,
    Tags: Mapping[str, str] = ...,
    Status: NotificationRuleStatusType = ...,  # (3)
) -> CreateNotificationRuleResultTypeDef:  # (4)
    ...
  1. See TargetTypeDef
  2. See DetailTypeType
  3. See NotificationRuleStatusType
  4. See CreateNotificationRuleResultTypeDef
# create_notification_rule method usage example with argument unpacking

kwargs: CreateNotificationRuleRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "EventTypeIds": ...,
    "Resource": ...,
    "Targets": ...,
    "DetailType": ...,
}

parent.create_notification_rule(**kwargs)
  1. See CreateNotificationRuleRequestRequestTypeDef

delete_notification_rule#

Deletes a notification rule for a resource.

Type annotations and code completion for boto3.client("codestar-notifications").delete_notification_rule method. boto3 documentation

# delete_notification_rule method definition

def delete_notification_rule(
    self,
    *,
    Arn: str,
) -> DeleteNotificationRuleResultTypeDef:  # (1)
    ...
  1. See DeleteNotificationRuleResultTypeDef
# delete_notification_rule method usage example with argument unpacking

kwargs: DeleteNotificationRuleRequestRequestTypeDef = {  # (1)
    "Arn": ...,
}

parent.delete_notification_rule(**kwargs)
  1. See DeleteNotificationRuleRequestRequestTypeDef

delete_target#

Deletes a specified target for notifications.

Type annotations and code completion for boto3.client("codestar-notifications").delete_target method. boto3 documentation

# delete_target method definition

def delete_target(
    self,
    *,
    TargetAddress: str,
    ForceUnsubscribeAll: bool = ...,
) -> Dict[str, Any]:
    ...
# delete_target method usage example with argument unpacking

kwargs: DeleteTargetRequestRequestTypeDef = {  # (1)
    "TargetAddress": ...,
}

parent.delete_target(**kwargs)
  1. See DeleteTargetRequestRequestTypeDef

describe_notification_rule#

Returns information about a specified notification rule.

Type annotations and code completion for boto3.client("codestar-notifications").describe_notification_rule method. boto3 documentation

# describe_notification_rule method definition

def describe_notification_rule(
    self,
    *,
    Arn: str,
) -> DescribeNotificationRuleResultTypeDef:  # (1)
    ...
  1. See DescribeNotificationRuleResultTypeDef
# describe_notification_rule method usage example with argument unpacking

kwargs: DescribeNotificationRuleRequestRequestTypeDef = {  # (1)
    "Arn": ...,
}

parent.describe_notification_rule(**kwargs)
  1. See DescribeNotificationRuleRequestRequestTypeDef

generate_presigned_url#

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for boto3.client("codestar-notifications").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

list_event_types#

Returns information about the event types available for configuring notifications.

Type annotations and code completion for boto3.client("codestar-notifications").list_event_types method. boto3 documentation

# list_event_types method definition

def list_event_types(
    self,
    *,
    Filters: Sequence[ListEventTypesFilterTypeDef] = ...,  # (1)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListEventTypesResultTypeDef:  # (2)
    ...
  1. See ListEventTypesFilterTypeDef
  2. See ListEventTypesResultTypeDef
# list_event_types method usage example with argument unpacking

kwargs: ListEventTypesRequestRequestTypeDef = {  # (1)
    "Filters": ...,
}

parent.list_event_types(**kwargs)
  1. See ListEventTypesRequestRequestTypeDef

list_notification_rules#

Returns a list of the notification rules for an Amazon Web Services account.

Type annotations and code completion for boto3.client("codestar-notifications").list_notification_rules method. boto3 documentation

# list_notification_rules method definition

def list_notification_rules(
    self,
    *,
    Filters: Sequence[ListNotificationRulesFilterTypeDef] = ...,  # (1)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListNotificationRulesResultTypeDef:  # (2)
    ...
  1. See ListNotificationRulesFilterTypeDef
  2. See ListNotificationRulesResultTypeDef
# list_notification_rules method usage example with argument unpacking

kwargs: ListNotificationRulesRequestRequestTypeDef = {  # (1)
    "Filters": ...,
}

parent.list_notification_rules(**kwargs)
  1. See ListNotificationRulesRequestRequestTypeDef

list_tags_for_resource#

Returns a list of the tags associated with a notification rule.

Type annotations and code completion for boto3.client("codestar-notifications").list_tags_for_resource method. boto3 documentation

# list_tags_for_resource method definition

def list_tags_for_resource(
    self,
    *,
    Arn: str,
) -> ListTagsForResourceResultTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResultTypeDef
# list_tags_for_resource method usage example with argument unpacking

kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "Arn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

list_targets#

Returns a list of the notification rule targets for an Amazon Web Services account.

Type annotations and code completion for boto3.client("codestar-notifications").list_targets method. boto3 documentation

# list_targets method definition

def list_targets(
    self,
    *,
    Filters: Sequence[ListTargetsFilterTypeDef] = ...,  # (1)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListTargetsResultTypeDef:  # (2)
    ...
  1. See ListTargetsFilterTypeDef
  2. See ListTargetsResultTypeDef
# list_targets method usage example with argument unpacking

kwargs: ListTargetsRequestRequestTypeDef = {  # (1)
    "Filters": ...,
}

parent.list_targets(**kwargs)
  1. See ListTargetsRequestRequestTypeDef

subscribe#

Creates an association between a notification rule and an Chatbot topic or Chatbot client so that the associated target can receive notifications when the events described in the rule are triggered.

Type annotations and code completion for boto3.client("codestar-notifications").subscribe method. boto3 documentation

# subscribe method definition

def subscribe(
    self,
    *,
    Arn: str,
    Target: TargetTypeDef,  # (1)
    ClientRequestToken: str = ...,
) -> SubscribeResultTypeDef:  # (2)
    ...
  1. See TargetTypeDef
  2. See SubscribeResultTypeDef
# subscribe method usage example with argument unpacking

kwargs: SubscribeRequestRequestTypeDef = {  # (1)
    "Arn": ...,
    "Target": ...,
}

parent.subscribe(**kwargs)
  1. See SubscribeRequestRequestTypeDef

tag_resource#

Associates a set of provided tags with a notification rule.

Type annotations and code completion for boto3.client("codestar-notifications").tag_resource method. boto3 documentation

# tag_resource method definition

def tag_resource(
    self,
    *,
    Arn: str,
    Tags: Mapping[str, str],
) -> TagResourceResultTypeDef:  # (1)
    ...
  1. See TagResourceResultTypeDef
# tag_resource method usage example with argument unpacking

kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "Arn": ...,
    "Tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

unsubscribe#

Removes an association between a notification rule and an Chatbot topic so that subscribers to that topic stop receiving notifications when the events described in the rule are triggered.

Type annotations and code completion for boto3.client("codestar-notifications").unsubscribe method. boto3 documentation

# unsubscribe method definition

def unsubscribe(
    self,
    *,
    Arn: str,
    TargetAddress: str,
) -> UnsubscribeResultTypeDef:  # (1)
    ...
  1. See UnsubscribeResultTypeDef
# unsubscribe method usage example with argument unpacking

kwargs: UnsubscribeRequestRequestTypeDef = {  # (1)
    "Arn": ...,
    "TargetAddress": ...,
}

parent.unsubscribe(**kwargs)
  1. See UnsubscribeRequestRequestTypeDef

untag_resource#

Removes the association between one or more provided tags and a notification rule.

Type annotations and code completion for boto3.client("codestar-notifications").untag_resource method. boto3 documentation

# untag_resource method definition

def untag_resource(
    self,
    *,
    Arn: str,
    TagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
# untag_resource method usage example with argument unpacking

kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "Arn": ...,
    "TagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

update_notification_rule#

Updates a notification rule for a resource.

Type annotations and code completion for boto3.client("codestar-notifications").update_notification_rule method. boto3 documentation

# update_notification_rule method definition

def update_notification_rule(
    self,
    *,
    Arn: str,
    Name: str = ...,
    Status: NotificationRuleStatusType = ...,  # (1)
    EventTypeIds: Sequence[str] = ...,
    Targets: Sequence[TargetTypeDef] = ...,  # (2)
    DetailType: DetailTypeType = ...,  # (3)
) -> Dict[str, Any]:
    ...
  1. See NotificationRuleStatusType
  2. See TargetTypeDef
  3. See DetailTypeType
# update_notification_rule method usage example with argument unpacking

kwargs: UpdateNotificationRuleRequestRequestTypeDef = {  # (1)
    "Arn": ...,
}

parent.update_notification_rule(**kwargs)
  1. See UpdateNotificationRuleRequestRequestTypeDef

get_paginator#

Type annotations and code completion for boto3.client("codestar-notifications").get_paginator method with overloads.