Best Python code snippet using localstack_python
eventbridge.py
Source:eventbridge.py
...16LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,17OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE18SOFTWARE.19'''20def activate_event_source(Name=None):21 """22 Activates a partner event source that has been deactivated. Once activated, your matching event bus will start receiving events from the event source.23 See also: AWS API Documentation24 25 Exceptions26 27 :example: response = client.activate_event_source(28 Name='string'29 )30 31 32 :type Name: string33 :param Name: [REQUIRED]\nThe name of the partner event source to activate.\n34 """35 pass36def can_paginate(operation_name=None):37 """38 Check if an operation can be paginated.39 40 :type operation_name: string41 :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo').42 """43 pass44def create_event_bus(Name=None, EventSourceName=None, Tags=None):45 """46 Creates a new event bus within your account. This can be a custom event bus which you can use to receive events from your custom applications and services, or it can be a partner event bus which can be matched to a partner event source.47 See also: AWS API Documentation48 49 Exceptions50 51 :example: response = client.create_event_bus(52 Name='string',53 EventSourceName='string',54 Tags=[55 {56 'Key': 'string',57 'Value': 'string'58 },59 ]60 )61 62 63 :type Name: string64 :param Name: [REQUIRED]\nThe name of the new event bus.\nEvent bus names cannot contain the / character. You can\'t use the name default for a custom event bus, as this name is already used for your account\'s default event bus.\nIf this is a partner event bus, the name must exactly match the name of the partner event source that this event bus is matched to.\n65 :type EventSourceName: string66 :param EventSourceName: If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with.67 :type Tags: list68 :param Tags: Tags to associate with the event bus.\n\n(dict) --A key-value pair associated with an AWS resource. In EventBridge, rules and event buses support tagging.\n\nKey (string) -- [REQUIRED]A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.\n\nValue (string) -- [REQUIRED]The value for the specified tag key.\n\n\n\n\n69 :rtype: dict70ReturnsResponse Syntax71{72 'EventBusArn': 'string'73}74Response Structure75(dict) --76EventBusArn (string) --77The ARN of the new event bus.78Exceptions79EventBridge.Client.exceptions.ResourceAlreadyExistsException80EventBridge.Client.exceptions.ResourceNotFoundException81EventBridge.Client.exceptions.InvalidStateException82EventBridge.Client.exceptions.InternalException83EventBridge.Client.exceptions.ConcurrentModificationException84EventBridge.Client.exceptions.LimitExceededException85 :return: {86 'EventBusArn': 'string'87 }88 89 90 :returns: 91 EventBridge.Client.exceptions.ResourceAlreadyExistsException92 EventBridge.Client.exceptions.ResourceNotFoundException93 EventBridge.Client.exceptions.InvalidStateException94 EventBridge.Client.exceptions.InternalException95 EventBridge.Client.exceptions.ConcurrentModificationException96 EventBridge.Client.exceptions.LimitExceededException97 98 """99 pass100def create_partner_event_source(Name=None, Account=None):101 """102 Called by an SaaS partner to create a partner event source. This operation is not used by AWS customers.103 Each partner event source can be used by one AWS account to create a matching partner event bus in that AWS account. A SaaS partner must create one partner event source for each AWS account that wants to receive those event types.104 A partner event source creates events based on resources within the SaaS partner\'s service or application.105 An AWS account that creates a partner event bus that matches the partner event source can use that event bus to receive events from the partner, and then process them using AWS Events rules and targets.106 Partner event source names follow this format:107 See also: AWS API Documentation108 109 Exceptions110 111 :example: response = client.create_partner_event_source(112 Name='string',113 Account='string'114 )115 116 117 :type Name: string118 :param Name: [REQUIRED]\nThe name of the partner event source. This name must be unique and must be in the format `` partner_name /event_namespace /event_name `` . The AWS account that wants to use this partner event source must create a partner event bus with a name that matches the name of the partner event source.\n119 :type Account: string120 :param Account: [REQUIRED]\nThe AWS account ID that is permitted to create a matching partner event bus for this partner event source.\n121 :rtype: dict122ReturnsResponse Syntax123{124 'EventSourceArn': 'string'125}126Response Structure127(dict) --128EventSourceArn (string) --129The ARN of the partner event source.130Exceptions131EventBridge.Client.exceptions.ResourceAlreadyExistsException132EventBridge.Client.exceptions.InternalException133EventBridge.Client.exceptions.ConcurrentModificationException134EventBridge.Client.exceptions.LimitExceededException135 :return: {136 'EventSourceArn': 'string'137 }138 139 140 :returns: 141 EventBridge.Client.exceptions.ResourceAlreadyExistsException142 EventBridge.Client.exceptions.InternalException143 EventBridge.Client.exceptions.ConcurrentModificationException144 EventBridge.Client.exceptions.LimitExceededException145 146 """147 pass148def deactivate_event_source(Name=None):149 """150 You can use this operation to temporarily stop receiving events from the specified partner event source. The matching event bus is not deleted.151 When you deactivate a partner event source, the source goes into PENDING state. If it remains in PENDING state for more than two weeks, it is deleted.152 To activate a deactivated partner event source, use ActivateEventSource .153 See also: AWS API Documentation154 155 Exceptions156 157 :example: response = client.deactivate_event_source(158 Name='string'159 )160 161 162 :type Name: string163 :param Name: [REQUIRED]\nThe name of the partner event source to deactivate.\n164 """165 pass166def delete_event_bus(Name=None):167 """168 Deletes the specified custom event bus or partner event bus. All rules associated with this event bus need to be deleted. You can\'t delete your account\'s default event bus.169 See also: AWS API Documentation170 171 Exceptions...
client.pyi
Source:client.pyi
...113 def exceptions(self) -> Exceptions:114 """115 EventBridgeClient exceptions.116 """117 def activate_event_source(self, *, Name: str) -> None:118 """119 Activates a partner event source that has been deactivated.120 [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/1.24.58/reference/services/events.html#EventBridge.Client.activate_event_source)121 [Show boto3-stubs documentation](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_events/client.html#activate_event_source)122 """123 def can_paginate(self, operation_name: str) -> bool:124 """125 Check if an operation can be paginated.126 [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/1.24.58/reference/services/events.html#EventBridge.Client.can_paginate)127 [Show boto3-stubs documentation](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_events/client.html#can_paginate)128 """129 def cancel_replay(self, *, ReplayName: str) -> CancelReplayResponseTypeDef:130 """131 Cancels the specified replay.132 [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/1.24.58/reference/services/events.html#EventBridge.Client.cancel_replay)133 [Show boto3-stubs documentation](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_events/client.html#cancel_replay)134 """135 def close(self) -> None:136 """137 Closes underlying endpoint connections.138 [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/1.24.58/reference/services/events.html#EventBridge.Client.close)139 [Show boto3-stubs documentation](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_events/client.html#close)140 """141 def create_api_destination(142 self,143 *,144 Name: str,145 ConnectionArn: str,146 InvocationEndpoint: str,147 HttpMethod: ApiDestinationHttpMethodType,148 Description: str = None,149 InvocationRateLimitPerSecond: int = None150 ) -> CreateApiDestinationResponseTypeDef:151 """152 Creates an API destination, which is an HTTP invocation endpoint configured as a153 target for events.154 [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/1.24.58/reference/services/events.html#EventBridge.Client.create_api_destination)155 [Show boto3-stubs documentation](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_events/client.html#create_api_destination)156 """157 def create_archive(158 self,159 *,160 ArchiveName: str,161 EventSourceArn: str,162 Description: str = None,163 EventPattern: str = None,164 RetentionDays: int = None165 ) -> CreateArchiveResponseTypeDef:166 """167 Creates an archive of events with the specified settings.168 [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/1.24.58/reference/services/events.html#EventBridge.Client.create_archive)169 [Show boto3-stubs documentation](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_events/client.html#create_archive)170 """171 def create_connection(172 self,173 *,174 Name: str,175 AuthorizationType: ConnectionAuthorizationTypeType,176 AuthParameters: "CreateConnectionAuthRequestParametersTypeDef",177 Description: str = None178 ) -> CreateConnectionResponseTypeDef:179 """180 Creates a connection.181 [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/1.24.58/reference/services/events.html#EventBridge.Client.create_connection)182 [Show boto3-stubs documentation](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_events/client.html#create_connection)183 """184 def create_endpoint(185 self,186 *,187 Name: str,188 RoutingConfig: "RoutingConfigTypeDef",189 EventBuses: List["EndpointEventBusTypeDef"],190 Description: str = None,191 ReplicationConfig: "ReplicationConfigTypeDef" = None,192 RoleArn: str = None193 ) -> CreateEndpointResponseTypeDef:194 """195 Creates a global endpoint.196 [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/1.24.58/reference/services/events.html#EventBridge.Client.create_endpoint)197 [Show boto3-stubs documentation](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_events/client.html#create_endpoint)198 """199 def create_event_bus(200 self, *, Name: str, EventSourceName: str = None, Tags: List["TagTypeDef"] = None201 ) -> CreateEventBusResponseTypeDef:202 """203 Creates a new event bus within your account.204 [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/1.24.58/reference/services/events.html#EventBridge.Client.create_event_bus)205 [Show boto3-stubs documentation](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_events/client.html#create_event_bus)206 """207 def create_partner_event_source(208 self, *, Name: str, Account: str209 ) -> CreatePartnerEventSourceResponseTypeDef:210 """211 Called by an SaaS partner to create a partner event source.212 [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/1.24.58/reference/services/events.html#EventBridge.Client.create_partner_event_source)213 [Show boto3-stubs documentation](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_events/client.html#create_partner_event_source)214 """215 def deactivate_event_source(self, *, Name: str) -> None:216 """217 You can use this operation to temporarily stop receiving events from the218 specified partner event source.219 [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/1.24.58/reference/services/events.html#EventBridge.Client.deactivate_event_source)220 [Show boto3-stubs documentation](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_events/client.html#deactivate_event_source)221 """222 def deauthorize_connection(self, *, Name: str) -> DeauthorizeConnectionResponseTypeDef:223 """224 Removes all authorization parameters from the connection.225 [Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/1.24.58/reference/services/events.html#EventBridge.Client.deauthorize_connection)226 [Show boto3-stubs documentation](https://vemel.github.io/boto3_stubs_docs/mypy_boto3_events/client.html#deauthorize_connection)227 """228 def delete_api_destination(self, *, Name: str) -> Dict[str, Any]:229 """...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!